Which is kind of wild, because generators powered by combusting fuels are also giant fire hazards (and produce noxious CO and other gases), of course.
Though what is "inside" is debatable. My car can sit outside because it has the batteries in a case that is climate controlled when needed, and so the batteries count as inside even though they are in a car that is outside.
The generator is generally only risky when in operation. For natural gas units, a normally-closed solenoid keeps the gas off unless the controller actively commands it. A battery is constantly in a state of non zero fire risk when charged.