Throughout all history from Rome to Soviet Russia to the Bay Area. Giving away free stuff leads to an influx of people to the population center. They wanted or needed a free ride.
The population center doesn’t get taxes from those people, so they are a burden on the system.
Further exasperating the issue, corruption. There’s always corruption, in a company (using the corporate card to go out and eat), in government (preferred contractors - family friends, etc), etc. personally, I find corporations are slightly more accountable because they can fail if they don’t provide value... governments have no such burden. They raise taxes, and in the case of the US get bailed out by states or the feds. The only case counter to this is detroit that I know of (where it just collapsed).
When I lived in the bay, when I went to SF I was regularly accosted by people screaming. Shit was everywhere. The public transit was down at least once a week, it was miserable. I lived in Alameda and that was a bit better. Locals were super nice, worked on the beach, etc. still wondered why I couldn’t get the bus to show up but w.e.
If you want a better city / state, stop the one-party rule and actually shake things up. There needs to be competition and accountability. As it stands, it’s getting to the point the lights can’t even be kept on.