Flapper wrote:
A ground is to give an alternate path for the current, so you don't become the primary. But it needs to have a good path - either a ground rod, or the steel of a building, to get into the real ground.
Electrical energy from a battery, generator, inverter, or utility has to have a path to return to the source. In the event of a ground fault/short, the current "returns" by the low-impedance safety ground (typically bare or green insulated wire). The purpose of the safety ground is to allow as much current return to the source as possible to trip breakers/blow fuses as fast as possible.
An RV's 120Vac receptacle safety grounding pins are bonded to the RV frame. If the inverter isn't also bonded/grounded to the frame the fault current doesn't have good path back to the source, therefore you MUST bond the inverter's ground connection to the RV frame. The electrical safety ground has absolutely nothing to do with the soil it is sitting on. In fact, most locations have fairly poor soil conductivity and therefore not allowed to be used as a safety ground conductor.
The 12Vdc input side of the inverter is not always electrically to the inverter's 120Vac output, hence why there is a separate grounding connection for the inverter-frame bond.