Why is the white wire hot in an bath exhaust fan switch circuit?
In the past the white wire in a NM cable was used as either a hot or a switched hot in what is called a &quot;switch loop&quot;. This is no longer done, but, e.g., my 1970 house is wired that way.
Consider the case of a wall switch controlled ceiling fixture where the line power is in the ceiling box, i.e., black hot and white neutral (plus bare gnd) are in the ceiling box. The white neutral would be connected directly to the  neutral contact of the fixture and the hot would connect to one wire of a /2 + gnd cable going to the switch box.
The other wire in this cable would be the switched hot going back to the ceiling box and connected to the hot contact of the fixture. These /2 cables only came with white and black wires so the white had to be used either for the line hot or for the switched hot.
In this older arrangement there would be no neutral in the switch loop/switch box. At that time there was no need for a neutral in the switch box because the switches of that time did not consume power. New programmable switches do consume power and they require a neutral in the switch box to complete the circuit to allow current to flow back to the panel for their own internal operation.
Nowadays a /3 cable is used for this purpose with the white being used to carry neutral to the switch box and black and red used for hot and switched hot.