I can't imagine it's actually illegal. Maybe cost-prohibitive and a bit noisy, but plenty of people have UPS systems for their local devices and backup generators.
I can see how that might be true: can you cite an example location?
That's just nonsense and is not based on fact at all.