Contrariwise, I see San Francisco as a city that is struggling with some of the worst demographic issues in the nation, mostly stemming from having an absolutely absurd amount of wealth inequality for various structural and temporal reasons, and doing an admirable job of it. The "homegrown tech industry" was intentionally fostered in response to the valley turning the city into its bedroom community, so the idea that the city is somehow corrupting your vision of what SF could be is disingenuous. I suspect the SF in your recollection is the SF you yourself had a hand in changing into what it is today.