Electricity is a weird thing that most people don't understand. They just flip on a light switch or plug in their phone charger and go about their day without really giving it another thought. In reality, it's a weird, almost magical thing that involves a web of science, theory and mathematical calculations. I've studied it, read books on it, and work with it daily and honestly I still don't understand it 100%.
But one thing I do (mostly) understand is "bonding". The ground in most electrical systems acts as a safety net of sorts and when there's more than one electrical system being used (like on a location where production may use the location's electrical outlets/"house power" while also bringing in their own generator) it's important to connect the two grounds so both systems are on the same "plane," so to speak.
This is often done by attaching a grounding clamp to the grounding rod of the house we're shooting at (usually located below the electrical box of the location) and running the (appropriately sized) cable back to the generator and attaching the other end to the ground there. A good rigging crew knows this and is prepared to do this, seeing as how a Fire Marshall can shut the show down for the day if this isn't done. It's that important.
A bad rigging crew, however, will do this: