Bay Area workers don't get paid well just because of the higher cost of living. They also have a lot more options, so you have to pay more to keep them. Those factors combine to lead to inflated salaries which in turn attracts a disproportionate concentration of high quality workers. Companies then follow and or spring up from the talent pool, and boom, you've got yourself a tech hub and a positive feedback loop.
Living on a private island in the South Pacific is expensive, too, but most companies wouldn't pay a premium to employ you.
I'm not saying that if you pick two random software developers, one from Nebraska and the other from San Francisco, that the SF dev will always be better. I am saying that, if we track a population of 100 developers from Nebraska and SF, more of the top 20 devs from Nebraska than those in the bottom 20 are going to move to SF, and in the SF group more of the bottom quintile is going to leave than in the top quintile, leading to better median developers in the Bay.
Living on a private island in the South Pacific is expensive, too, but most companies wouldn't pay a premium to employ you.
I'm not saying that if you pick two random software developers, one from Nebraska and the other from San Francisco, that the SF dev will always be better. I am saying that, if we track a population of 100 developers from Nebraska and SF, more of the top 20 devs from Nebraska than those in the bottom 20 are going to move to SF, and in the SF group more of the bottom quintile is going to leave than in the top quintile, leading to better median developers in the Bay.