Connecting the shore power
ground to the (12 volt negative) under water
metal is the MAJOR source of electrolysis
damage to the metal. If you isolate them you don't need a galvanic isolator
or an isolating transformer.
If there was an accidental short between the AC power and any DC circuit you risk putting AC voltages into the water
that can kill people swimming in the vicinity or shock people boarding the boat (depending on situation). In particular the most vulnerable item is the battery charger
that links between the two systems.
The chance of a faulty battery charger
or a connection between the systems is nearly zero. The chance of killing someone if you do is also rare. "Nearly zero" multiplied by "also rare" is STILL NOT ZERO and the consequence are extreme. "Still not zero" multiplied by "extreme" is sufficiently high that most jurisdictions insist on the ground connection to the underwater metal so you either blow a fuse or remove any voltage from underwater metal. (Assuming your shore power
is wired correctly which is 100 times more likely!).
On the bonding or not bonding of underwater metal, my preference is only bond if needed. Electrolytic corrosion
only occurs if current
is flowing in the water. An isolated piece of metal in the electrolyte is like a charged battery but it has no current
flowing until you connect it to a load. If you never connect it, no current flows and no damage occurs. Once you bond it and complete the electrical
circuit you have to make sure it is on the receiving end of electrolytic currents by providing sacrificial zinc anodes (or equivalent). I suggest an annual inspection
of all unbonded underwater metal. Only if you see evidence of electrolytic corrosion
should you bond it.