The electricals under the hood of any car are, generally speaking, water resistant, not water proof.
Directed spray from a nozzle will penetrate electrical connectors and will get into spark plug wells etc.
Remember that most municipal water is hard (it contains minerals and salts...) When the water eventually does evaporate, it will leave behind these salts and minerals on electrical contacts etc, which can cause conduction issues and hard-to-diagnose electrical gremlins down the road.
Most cars exposed to flood waters are written off because of this: Aside from ruined fabrics and carpets, their electrical systems are usually completely hosed by the junk in the water.
Bottom line: Don't spray down the engine compartment. Use a rag and some Simple Green. If you must spray it down, be very, very careful and selective as to where you spray and how much pressure you use and, of course, prepare to deal with electrical issues.