Why do people NEED to work in san francisco/LA? You may think you're contributing something valuable being a barista or adjunct ethnic studies professor in the Bay Area but if you can't survive there maybe the others don't agree. Move to a house bigger than a shoebox with less traffic, less filth, and less crazy politicians, and lower costs. Whats the hangup? I don't understand these people who watched pirates of silicon valley and now they have to live in a shack on location.
You are right that it is a bit weird and hard to understand why productivity differs so much.
But that labour productivity (eg measured in salaries the market can bear) differs so much is a fact. Whether we like it or not.
That puzzle is mostly about productivity differences for tech workers. For the baristas in the Bay Area relatively standard explanations like the Baumol effect do most of the explanatory work.
The productivity is higher because you have one of the highest concentrations in the world of big companies at the top of the field employing the best people and most resources. Not rocket science.
This has nothing to do with people that think they deserve to work there (which I frankly don't get what the big deal is, you're not a teenager scoping out the best colleges anymore) but obviously the marketplace disagrees.
I'm not sure it has much to do with anyone deserving anything. It's just good for the economy if more people work in more productive places.
So if the best companies could employ more people in those places and pay them high salaries, those people would also pay high income taxes that could finance public infrastructure for the rest of the country.
Excluding people from work in productive areas perpetuates poverty.