Where do you think a rinky-dink municipality gets the money to pay for infrastructure? They turn to capital markets, who will make a profit on the bonds or whatever.
Where does an investor owned utility get the money to pay for infrastructure? Because they're generally not cutting into profits to fund infrastructure improvements.
PG&E is paying 2.4 billion dollars a year in interest expense (at least in 2023), so it's fair to wonder if that's really any better.
They also don't build transformers in-house; they pay vendors for providing goods and services. Why do you think capital is any different from other services? If a private utility issues a bond, investors in the bond will also make a profit on the bond in addition to investors in the private utility making a profit on the utility.