Also, the South Bay is becoming/has become enterprise-land. As Silicon Valley startups increasingly aim towards the consumer market, it makes sense that they would locate themselves in the biggest media/consumer/tourist hub.
(Even the biggest enterprise companies can be SF-based, though – SalesForce, for example...)
I don't know if that's true. A lot of B2B SaaS companies are in San Francisco, and I can't see a lot of them moving (Okta, New Relic, Twilio all come to mind). That said there are A LOT of old school enterprise companies in the South Bay / Peninsula.
(Even the biggest enterprise companies can be SF-based, though – SalesForce, for example...)