Probably the smoke detector is hardwired, and it is either on the same circuit as the bathroom outlet, or it is sharing the same neutral. If it alarms with low voltage, then it is the same circuit. If it alarms with high voltage, it is on the shared neutral circuit.
Just guesses on my part.
Larry