Where did "Wait 30 seconds before turning it back on" come from?
You want all capacitors to discharge. A poorly designed/constructed device could be damaged. But the more likely issue is that since you're power-cycling it to reset an unexpected/unhandled failure, a capacitor not being discharged could leave the system/circuit/device not fully reset.
On computers I tell people to wait for all fans to stop spinning. It's a fair compromise. This 30-second advice is much more relevant to a non-computer (simpler, bigger capacitors) device. We know that the complex parts of a computer will be reset upon power cycling them, regardless of any random capacitors.
I've certainly power-cycled things quickly, had it not work, then waited a significant time with it off, and had it work. No evidence if this mattered of course.
Shut the computer down, take the side cover off, and look inside to see if there are LED's on the motherboard that stay on when there's standby power. Now pull the plug and watch how long it takes for those lights to go out.
This is due to those capacitors carlito is talking about in another answer.
As far as I remember when I was told when I started to work on computer it was so the Hard Drive would stop spinning after the shut down. Then you would restart and the hard drive would spin normally as opposed to start up when it was still spinning from the shut off.
Who knows if this makes a difference or not, but I still wait 30 seconds.