A lot of large cities do own their electric utilities. For the larger systems it has to do with management and budgetary issues that the 1970s brought about. Essentially states couldn't keep the costs on their books anymore, and laws prevented publicly owned utilities from doing a lot of things to raise money, similar to how public pension funds are only allowed to invest in certain ways (which thankfully loopholes were found for in the 2000s) so they were made into monopolies that are heavily regulated in theory. This allowed them to get tons of money, write regulations to their advantage and still get to dump any problems onto the states when need be. All while making lots of good phony baloney jobs that nobody will ever be held responsible for their actions in.
The mythological argument was the same as phone, cable, internet, etc. that you can't go get service from someone else so they're "natural" monopolies and thus must be protected as such. And at this point in most cases, states simply couldn't own them now, they're way too large for the budgets to handle. Federal regulations have also increasingly withered state regulatory arms so they mostly just produce lots of paperwork rather than regulations of general public interest.
California's a special type of mess because to fix their busted system they created an even more busted system that allowed people to sell hypothetical electricity into the market even though actual generation was controlled and required to come from certain producers but distribution was to theoretically operate based on the "market supply" and they've spent 20 years trying to patch this. PG&E is a special disaster because they sold off most of their generating power but never stopped signing their commitments to supply. That was how Enron sent them into bankruptcy the last time by constantly selling them a bunch of non-existent but hypothetical electricity. I have no idea what the current bankruptcy is about (they say the wildfires), but the last time PG&E was saved by being allowed to exceed price and ignore other regulations for some time so they could pay off their huge debts from being stupid. Hopefully they can do so again to protect the consumers of California from being swarmed by predatory energy companies.