The cloud providers themselves run their own generators. Computers aside, every place I worked at that did critical manufacturing ran their own generators as well. That said, I agree with your general statement, that this should be a commodity, but we’ve accepted that vendor lock in is better than having a department / the cost of humans lock-in.
I think Google has at least 1 datacenter that uses batteries instead of generators.
>In Belgium, we’ll soon install the first ever battery-based system for replacing generators at a hyperscale data center. In the event of a power disruption, the system will help keep our users’ searches, e-mails, and videos on the move—without the pollution associated with burning diesel.
https://blog.google/inside-google/infrastructure/cleaner-dat...
Disclosure: I work at Google, but no on anything related to this.
They only run the generators if the power company fails. To bring that analogy to servers, that would be running your loads in the cloud, but in the case of an outage, failing over to bare metal servers you run yourself. That sounds like the worst of both worlds to me.