The appeal of the south bay is cheaper housing than the peninsula and the city, but also far less crime than the east bay (and less traffic, but not anymore). Also, most of the established tech companies are here: Google, Apple, Facebook, Microsoft, Intel, AMD, Nvidia, Netflix, Cisco, etc. The tech scene is not just about startups. These established companies employ a lot of engineers, and they aren't going anywhere.
At some point in many engineers' careers, the startup scene becomes a bit less appealing. This isn't just because of work-life balance or ageism -- it's because most startups only need a few senior-level employees. The majority of startup employees are young because startups need people to do entry-level work, and young people are willing to. If you want to do truly interesting, challenging, senior-level programming work, you are far more likely to find it at a large company than at a startup.
That's not to say that there isn't plenty of boring work at large companies, because there is a ton of it, but rather that large companies have more open positions for senior-level engineers doing interesting work than startups do. Their benefits are also quite good, which matters more when you have a family. Most of these large companies are in the south bay, and if you are going to work at one of those companies, you might as well live nearby and save yourself the aggravation of a long commute, whether it be by car, train, or Google bus.
I know plenty of people who live in SF, and frankly some of them end up going out in San Francisco less often than I do. Most of their weeknights consist of going home, eating dinner, and watching TV or reading a book, just like most people. The big difference is that they pay over $3k for their apartments, and I pay half that. If you're going to have a conventional, boring home life 5 days a week, you might as well save some money. I can go to San Francisco whenever I feel like it.