I am seeing this very often these days.
How, I wondered, could so many have placed the switches and receptacles over the tub?
Then I realised that the situation arose when the homeowner re-modeled, and replaced a standard tub with a wider, often "whirlpool" tub. The wider tub, and the space required for the pump, moved the edge of the tub out, under the switch/receptacle.