Earlier quoted context omitted.
Probably because the alternative is to not have power during the (increasingly common) blackouts. I'm assuming that is the alternative due to there not being a proper way to accomplish this goal that does not cost thousands of dollars.
There are reasonably priced (under $100, though not under $3 like a common receptacle) male power inlets. https://www.homedepot.com/p/Reliance-Controls-30-Amp-Power-I... is the first one I found on Google (4-wire for 240V center-tapped), but there are many, including a 120V version: https://www.amazon.com/Leviton-5278-CWP-Straight-Flanged-Rec... Even these, if hardwired to the building's service, represent some risk,…
In particular, both can kill hapless power company employees by unexpectedly backfeeding into downed parts of the grid, and they have similar carbon monoxide/fire hazard issues.
(Not that there is anything wrong with the product; I wish they were mandatory, so they'd reliably be inspected after installation!)