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.
That's bullshit. E.g. electronics cost the same in all countries.
In location A you might spend 80% of your salary on fixed expenses, whereas in location B you only need to spend 20% of that same salary to pay for those expenses - leaving you with far more money for discretionary spending.