If I may anecdotally share my observations, of the handful of people that I personally know who have founded Startups in 2016 and 2017 -- all of them are in their late 30s, and have dependents (spouse, children, pets). All of them currently live on the peninsula or in the south bay, even if at some point in the past most of them lived in the city.
It is increasingly getting harder and harder to justify the costs of living in the city in view of the small livable space that your apartment gets you. Add to that a lousy school system, a never-ending homeless problem, and an incompetent MTA. Living in Palo Alto, Menlo Park, or Mtv. mitigates most of these flaws while retaining all the upside of being in the bay area.