The obvious objection, since everybody arrives at it within about a day: yes, somebody can turn the light off on you from the corridor, and yes, this is the single most reliable practical joke in any building where the switches are outside.
Worth knowing that newer installations often avoid the whole argument. An isolated switch with mechanical separation, or a low-voltage switch driving a relay elsewhere, satisfies the same rules while sitting inside the room. So in a recently rewired building you may find the switch has moved back in, next to a bathroom that is otherwise identical to the one down the road.