And the Ground(green) should be more of a safety path to ground in the event an appliance shorts. When the Green and White are connected at the boat, there's 3 return paths all open. So if a neutral connection is corroded enough to be more resistant than the ground connections, AC to DC ground on boat, it will easily return current through the engine and prop, and then through the water.
The ground should serve as a single safety path back to the source, be that dockside power, onboard generator or inverter. It should be an uninterrupted line to ground at source.
As Wing mentions, this doesn't eliminate galvanic corrosion between boats at docks. That takes additional measures, but still, the green and white don't connect onboard.