I think places where the police still walk a beat (or other regular outreach over a wide area) and get to know the locals rarely have issues with regular people. But cities don't want to spend that kind of money on these things as they would rather not tax people to pay for it. Yet it's an investment in cities' future; otherwise you wind up with this.
I think you may be underestimating how much cities dedicate their budgets to police spending:
"Mayor Eric Garcetti's 2020-2021 city budget gives police $3.14 billion out of the city's $10.5 billion. That's the single biggest line item, dwarfing, say, emergency management ($6 million) and economic development ($30 million)." (In fact, LAPD is getting pay raises while LA teachers are getting a pay decrease)
"New York City spends more on policing than it does on the Departments of Health, Homeless Services, Housing Preservation and Development, and Youth and Community Development combined."
"A whopping 39 percent of Chicago's 2017 budget went to police, and still the department got even more money, peaking in 2020 with a 7 percent increase to nearly $1.8 billion."
Note, this is, to the best of my knowledge, solely police, not even adjacent forces like e.g. fire departments or ambulances.
> "Mayor Eric Garcetti's 2020-2021 city budget gives police $3.14 billion out of the city's $10.5 billion. That's the single biggest line item, dwarfing, say, emergency management ($6 million) and economic development ($30 million)." (In fact, LAPD is getting pay raises while LA teachers are getting a pay decrease)
The Los Angeles Unified School District boundaries don't match the Los Angeles city boundaries, so comparison is tricky, but the most recent budget available (2018-2019) was $13.8 billion. [1]
In California, school districts are not connected to city government, despite like all the mayors ever always talking about them. Zero of the LA city budget goes to LA schools, because school districts get their money from the counties they're in and the state. I don't know if San Francisco has a county government separate from its city government, so it may be an exception.
[1] http://ssr.lausd.net/BudgetTransparencyDistrictGrp1.aspx?Fis...
The broader Bay Area is closer to the LA system, although transit and utilities are more likely to be detached from cities than education.