Almost all these pseudo-government projects are funded out of the general budget, and some are off-books but still off-balance sheet liabilities of the government. E.g. a port authority that floats its own bonds, but those bonds are guaranteed by the local government, so if the port authority becomes insolvent the government is on the hook. If you think entity X can make its own profit and loss, then ask yourself: who is on the hook when the bonds sold by X default? It is always going to be a taxpayer for a government project.
A clean separation between things that are supposed to turn a profit and things that should be funded socially is a good separation, and trying to blur those lines is usually a bad idea, as you create these unaccountable subsidized bureaucracies that end up being poorly run sources of graft after a few generations.
Now whether internet access itself should be subsidized or turn a profit is a different matter. It's critical infrastructure, like roads, so you can make a case for subsidies.
And they run out of money because of pension benefit requirements and a lot of other politically mandated issues (see e.g. https://www.politifact.com/factchecks/2020/apr/15/afl-cio/wi...).
Not to mention the events of the 45th Presidency with tearing down sorting machines and other actions intended to impede by-mail voting...
They also get to regulate their competition.
Which in turn means no one tries to compete, since it's pointless, and the city has a monopoly by default.
Or at least that's how it usually plays out. Don't know if any jurisdictions have found a way to make this work well.
See my other comment about contractors though... what we saw in TN was Comcast "contracting" its services to "build a municipal network", but instead just built their own crap using taxpayer funding.