Ok, you have some good questions, and it is difficult to find something on the web to help explain or illustrate exactly what you are asking.This can be a complicated topic to understand, and explain to someone that may or may not understand grounding, theory, etc. So I will do the best I can.
First, keep in mind, a portable genset is called a Separately Derived System, and is treated just like a service. The neutral (grounded conductor) and equipment ground are connected, and grounded to earth.
This is to insure the first breaker, at the power source will trip. This lowers the impedance of the grounding wires.You can think it as allowing the fault current (short) to return to the source.
A genset connected to a home will normally be a Non- separately Derived System, and the neutral and grounding is separated, same as a sub panel.
This method is dictated by the transfer switch , not by the generator or the purpose.
If the transfer switch does not switch the neutral from the genset, the neutral of the genset and the service is connected permanently, and this system is now called the Non-Separately Derived system,
If the transfer switch switches, or opens, the neutral at the same time as the ungrounded conductors (hots), then the genset is treated as a separate service, and the neutral and ground is connected, and grounded the same as the main service, with it's own grounding electrodes (ground rods).
The main purpose is that any electrical system should be grounded at one point, again, to insure the main breaker will trip, and to eliminate ground loops, which can occur if there were more than one grounding point beyond the main service. If there were a short circuit, the fault currents can, and will seek out each ground rod, and basically get divided to each ground rod, and not necessarily evenly, due to the impedence of each ground path.
This can result in fault currents flowing but not get to a high enough threshold to trip the main, or any breaker for that matter.
Did this make any sense?