> The cost of living is so high in part because so many have ridiculously high salaries
Bigger problem in the SF area is that a bunch of folks who owned property before the gold rush have ended up real-estate-rich, and formed a voting block that actively prevents the construction of new housing (on the basis that it might devalue their accidental real estate investment)
It's not about deserving, programmers just have enough market power to be able to choose to go elsewhere. Janitors and other more fungible employees do not.
Besides, I did already say that everyone else was underpaid relative to costs. But that's not unique to the Bay Area. Cost of housing relative to income is terrible in almost all of the major European cities too.
Once cities become wealthy enough to develop a home owning class, they seem to cease being able to provision adequate housing supply in general.