Labor's price is set in a competitive factor market, just like land or capital. It gets bid up and down by supply and demand. Let's call this "the labor market force".
How much value a person can provide in a given setting depends on a whole range of things including what the employer does (scaled product company vs. body shop), overall management effectiveness, how motivated they are (both themselves and by their employer), their skill level, etc. Let's call this "the company force"
The reason people aren't paid as much as California devs elsewhere has a lot more to do with the "company force" than the "market force". The fact is, most companies who employ developer just don't need great devs. They need people who can develop websites of moderate complexity, keep things going, write line-of-business software, etc., not people who can do original, innovate algorithmic work.
Related, there is no "Developer shortage". There is only a technical talent shortage insofar as dev salaries are getting bid up and the buyers who are getting outbid (mostly smaller startups) are complaining. The good companies are getting exactly who they want.