Amazing, the paths 'logic' takes us down!
Imagine a place where the 'code' forbade any switches, any receptacles, in the bathroom at all .... even to the point of requiring a switch for the water heater. Been to Israel lately? Small wonder beards are fashionable there.
Imagine a place where the water heater was typically hung within the shower enclosure- to the extent where the washrag often gets hung from the flex feeding it. Been to Turkey lately?
Imagine a place where switches were outside the bath, and the 'receptacle' was of extremely limited power? Been to Britain lately?
Imagine a place where switches had to be 3-ft. from the shower. Hello, Canada.
Imagine a 'backwards' country where they actually REQUIRE a receptacle near the sink, and you can put a switch right at the edge of the shower. Look out your window lately?
Yet, for some silly reason, our 'shocking disregard' doesn't result in many shocks at all.
Codes, like good cooking, aren't made by any single element. All of the places I mentioned are quite modern, and quite regulated. It's just that their codes often start from different precepts, and even today their electrical systems use different elements. Thus, individual requirements that seem strange at first start to make sense once they're seen in context.