Why can a boiler dipped in a glass of water be plugged into the network, but not without water?

Water, it serves as a cooling for the boiler, and if you turn on the boiler in the network, not dipped in water, it will simply overheat.
