Another reason to not live in the central valley is the smog, pesticides, cattle farming and intense summer temps. The water sucks due to chemical pollution. Smoke from ongoing fires is a regular feature year round anymore. Btw, there are poor people all over California, even the coast! If you have to rent, you're poor because rent can eat more than half your income. A fact of life in California. Thanks Airbnb!
Those cities have actual residents for a variety of reasons: people with some good sense and some education bought a home in a coastal California city, for, say $40,000 in the 1950's and now it's worth $1.5 million or more and the mortgage was paid off many years ago. Then there are children of those same people that inherited a home or two worth about the same, and with no mortgage. Lake-front homes, ocean-view and coastal city homes have been pricey since people lived in caves.