How Electricity Gets Into the Water
The usual path runs from shore power to the water. A marina or dock supplies electricity through a power post, often called a shore-power pedestal. A cord carries that power to a boat. If something along that path is faulty, current can escape into the water instead of returning safely through the wiring. The fault might be damaged insulation, a corroded connection, or a pedestal or boat that is not properly grounded. Grounding means giving stray current a safe route back to the source.
One device meant to catch this is the equipment-leakage circuit interrupter, or ELCI. An ELCI senses current leaking to ground and shuts off the power. When an ELCI is missing, has failed, or has been bypassed, leaking current may keep flowing.
The kind of water also matters. ESD is mainly a fresh-water hazard. Salt water carries electricity much more easily, so current spreads quickly and the gradient fades. In fresh water the current lingers around its source, and a human body, which carries current better than fresh water does, can bridge it.
For a family, these details point to where answers may be found: the pedestal, the cord, the boat's wiring and the ELCI. Two published standards are often the measuring stick for that equipment. NFPA 303, the Fire Protection Standard for Marinas and Boatyards, addresses marinas and boatyards specifically, and NFPA 70, the National Electrical Code, covers electrical work more broadly; both come from the National Fire Protection Association. Which edition a place adopted, and what it required there, are questions for the standards' text and local law, and they are among the things a conversation with an attorney can help sort out.