Generators act as a storage for surplus energy that:
A) Sustains machinery and energy-weapons when cut from your power grid.
B) You consume more energy than your power grid has, like if you build too much machinery and need to resolve a power crisis, or you have a ton of energy-weapons.