There's a lot more to Silicon Valley than San Francisco. It's just as expensive with a lot of people absorbed in their work, but does away with the bad weather and crime.
I've never understood why so many tech companies over the last decade went up to SF. Before that most were down the peninsula and in San Jose. I'd pick the lower peninsula over SF no question.