how is SF still so valuable if so much is going wrong
You can't just look at a snapshot in time.
New Jersey used to be a major economic hub in the US. Now it's a state with corruption, high taxes, low quality of life and a net migration out for a long time.
Nothing says it can't happen here. Hell, SF lost like 20% of it's population between 1950 and 1980.
Even the new techies can’t afford houses at this point