A computer that is only shut down is not truly switched off. It is in a 'stand-by' state. This meaning that most of the voltage lines that feed the computer parts have been removed. It remains like this until you press the button on the computer to boot it up again. For this to happen, part of the power supply must have the mains voltage applied to it all the time. It will be something in this 'permanently live' area that went BANG!, frightened the life out of you and cost you some money.
A surge protector won't prevent that happening if the cause of the fault was internal to the power supply. It would only help prevent any damage being done due a rise, spike or surge in mains voltage.
I always flip the mains switch when the computer is not in use, although that didn't stop the power supply packing in after about 6 years of use. It didn't go with a bang though. It just failed to power the computer up.
_________________________
Error: Keyboard not attached. Press any key to continue..