When you've got kids, things like bars and restaurants take a back seat to good schools and family-friendly neighborhoods.
Of all my coworkers with children, maybe 10% chose to stick it out in SF and they seem to bitch non-stop about the schools.
If a family with two adults and three children wants a 3-bedroom property, their budget depends on two adults' salaries minus the costs of three children.
On the other hand, if it's house-shared by four childless adults in their mid 20s, their budget is four adults' salaries, with none of the costs of children.
The problem is that with the rise of housing as an investment vehicle, cities have rapidly increased in price. In most countries housing is not a high-yield investment like stocks, it's a safer, low-yield investment like bonds. REITs have managed to destroy the goal of affordable housing for most people.
20s through 50s.