The entire sofrware+hardware industry before the 2010s was south of Redwood Shores and the biotech industry was always situated in northern San Mateo County. Before the 2010s, SF was primarily a hub for the Northern California legal+investment banking industries, both of which cratered during the GFC.
There's a reason why "FiDi" is called that - SF used to be the Wall Street of the West until the GFC, and most private sector white collar jobs in the city back then were legal and finance related.
It's still as crummy now as it was then. I remember seeing drug addicts on market as a kid, as well as the gang crap in Hunter Points (what's now called Mission Bay - India Basin has been renamed Hunters Point) and Mission District.
The difference is Mission, Northern Tenderloin/"Lower Nob Hill", Western Addition/"Hayes Valley", and Hunters Point had been extremely gentrified at a shallow level by transient white collar workers and creative types (artists, musicians, etc) in their 20s and 30s (aka. Most SF HN commentators)
Neither group started families let alone sent kids to public schools in SF, nor were either group actively connected with electoral politics within SF (voting isn't connected), and the same issues that I saw in K-8 in SFUSD continue to persist.
Also, a massive proportion of SF's population cannot vote due to immigration status (around 40% last I checked). Add to that an addition 10-20% to represent unattached transplants and townies and the voting pie shrinks massively, so SF politicians end up pandering to the subset that votes instead
Think you got this backwards.