There is a huge amount of land in California the middle class can afford: the Central Valley. The air is so bad you are almost guaranteed to experience asthma or allergies, but you can swing it on as low as 30k per year
That's not the only affordable area, by far. Half the state is desert, starting from just outside the L.A. Basin, and rent is extremely cheap there. The freeways make it possible to commute from bedroom communities there to large cities every day. And the air quality out there is great.
Those kids living in LA, SF, SD who make 30k per year? They basically live in squalor(for America). They value the coolness of those cities so much they are willing to live 4 to a 2-bedroom, or get their own place and live paycheck to paycheck,
People predominantly choose where to live based on family roots, or jobs.
Go out where land is cheap, and there's probably no jobs there. It may suck to spend half your paycheck on rent, but it's infinitely better than getting no paycheck... And there's always the American Dream aspect of it. Everybody thinks if they move to a rich area, they're going to strike it rich, too... Sort of an investment in your future that way. Never mind how few make it, and how many people move away after a few years.
"Roots" are pretty simple... if you've got lots of family in an expensive area, you're not likely to move too far away, even if you're struggling. It's a big scary break to leave all your friends and family, and the only area and culture you've known, behind, all for cheap rent you might not be able to afford on your lower wages, anyhow.