Is there a good reason why a developer in Thailand or India should be paid less than their colleague who works on the same team, but is based in the US? Many companies believe so - there's a significant difference in the cost of living between those two employees, and employers believe it is fair to adjust the salary to provide a similar quality of life to both.
Equally, a person incarcerated in New York City doesn't have the same living costs as a person who has to live in New York City, so you could reasonably argue that any "Cost of living premium" that a company offers to NYC based employees doesn't need to apply to a person who doesn't experience those higher costs.
Yes, and that reason is that people in most of the developed world are free to say yes or no to job offers based on their individual preferences. And, it just so happens, in Thailand and India there are many people who will happily say yes to offers that people in the US would say no to. The cost of living explanation that companies give is illusory; the reality is that they have to pay enough to get people to say yes.
Now, you might ask why people in different countries say yes to offers at different compensation levels. But I think the answer is self evident: people will say yes to offers when they believe that there are lots of other people who will say yes to it. Under those circumstances, saying no won't earn a higher offer but cause the company to give the job to someone else.
Ultimately, then, regional prices are set by what the locals are generally willing to say yes to.
Mediocre talent ... maybe not so much, but these are also the folks that could be replaced by AI.
Indeed. Top talent can say no to lower offers because they are confident that companies are unlikely to find other top candidates who will say yes.