Some of it is immigration too: if you come from Paris or Berlin, you’re not going to want to move to Mountain View, given how ridiculously boring the peninsula is.
After growing up in central London, Silicon Valley was awesome. No more waiting for the bus, just drive everywhere, parking is easy, everywhere is safe. If you live in downtown Mountain View or Sunnyvale you can walk down the street to pubs and restaurants. Why live in SF with constant crime, begging and no parking, and a giant commute to Apple or Google?