I was at a camera shop that swapped lenses on an A65 (or something like that) while it was on. I cringed. A lot.
From what I know, when the camera is on, it produces an electrostatic charge. That charge tends to be much stronger in the area of the sensor, particularly when that shutter's open, and because of the fact that a lot of the electronics are centered around it out of necessity. That electrostatic charge attracts oppositely charged dust particles, of which there's bound to be trillions in the area you happen to be because nature hates us all. Anyway, turn the camera off, and that charge isn't nearly enough to attract those same dust particles.