Legality depens on your location. In most european countries for example this will be very illegal, and you will do jailtime for attempting it.
I rather doubt it will activate TX on any radios when in airplane mode or shutdown, as that would be a severe violation of FCC rules. Passive listening on GPS signal or CCC's on 2G/3G might be allowed, though. Then, later when the device goes online it could send this information to some central tracking (Microsoft?) server.
I would also believe it was some sort of malware infestation, those being most common on Android devices.