A compensation gap only matters if it also leads to a gap in living standards. Tech salaries in the US are fairly homogenous with respect to cost of living; a developer in Ohio making an Ohio-adjusted salary would be able to afford similar things as a developer in the Bay Area making a Bay Area salary. (In fact, I'd bet that the Ohioan would be able to afford a much nicer house; CoL does not scale uniformly across goods and services with respect to location.)
However, tech salaries in the US are much higher than tech salaries in Europe even after adjusting for cost-of-living. That is what leads to resentment: a developer in London making a London salary would not be able to afford the same things as a developer in New York making a New York salary.
However, tech salaries in the US are much higher than tech salaries in Europe even after adjusting for cost-of-living. That is what leads to resentment: a developer in London making a London salary would not be able to afford the same things as a developer in New York making a New York salary.