Everytime you wash your hands under running warm water or take a shower, there's a direct line of water between you and the heating element.
Think of it like this - would you do this? : put a hair dryer in a plastic bag and plug it in and turn it on. Now put it and your hands under the water running out of the bathroom sink tap. Same thing. You're depending on the platsic bag, or the heater element jacket, to keep the electrical part out of the water your hands are in. No?
So you're saying it's possible for electricity to travel fom your water heater, through the pipes, out the faucet, down the stream of water, through you, then.......... where?
The difference between the hair dryer and your water heater is that the hair dryer is SEPERATED from a potential ground source (usually the pipes that carry the water). And if the hair dryer has a fault in it, YOU become a potential circuit. But a water heater has both the source of electricity and a ground
within the same enclosure, so electricity isn't going to travel up the pipes and into your bathroom and to the faucet and through the water, then through you, and then back to the water heater through the pipe. A single pipe cannot be the supply and return path for the electricity any more than a single conductor can supply the hair dryer and provide a return path.
Of course, this is assuming a metal plumbing system such as copper or galvanized pipe. Pex systems are basically plastic, and therefore are insulators. And water isn't really a good conductor either.