I suspect it's also part and parcel with having a city that is vastly "commuter" in some way - SF has about 800k population and estimates are that 250k commute into it each day; meaning that the "voting residents" make up only about 80% of the "actual city users".
This means there's a steady supply of "tax income" that is not from residents, which I bet exacerbates the problem until such time as companies move to the suburbs.
Some areas have "solved" this by moving much of the actual government to the county level, or by creating intercity agencies to handle things.
In regular cities you simply can’t afford to be wasteful. But San Francisco and Seattle have endless streams of easy money to burn.
It’s sort of like the oil curse. The governments of gulf states can afford to be uniquely terrible, in ways other governments cannot.