It also works (and is similarly disgusting) in a single country where the salary discrepancy is large.
I live in Poland, where the gap between IT and non-IT is staggering. Teaching programming easily nets me 5 times as much money as a regular public school teacher would get. Same goes for regular development work: developer salaries here are 4-6x the average salary. Are we making that much of a bigger impact on society?
Any time I visit a hairdresser, a car mechanic or anyone from the services sector and I wonder why things are expensive, I compare their hourly rates to mine. The hairdresser may be getting something like 20% of the money I'd make in that time – and they have to support the salon for some of that as well (also, they're just someone else's employee, so they get maybe half of that in the end). No longer does it seem expensive at all, and it goes for any service I can imagine.
Make these people better compensated... and I'd no longer be rich. We'd all be pretty much the same. Perhaps that's where the fear you see in some other comments here stemming from – "but this will lower the salaries for the top X%!". Yes. We'd have to admit that we're not special in terms of our contribution to society – just lucky enough to be in a booming industry. Or perhaps a growing bubble.
And sure – my work has the potential to produce a lot of value. I recently wrote software that will (indirectly) enable a large warehouse operator to essentially fire their entire workforce and replace them with robots. Last I checked, the individuals currently in that workforce make something like $5 an hour, and the business owner is proud enough to put that on their job ads. When the automation machine is finished, these people will be unemployed. How will they be making their living? Nobody in the process cares. So how has my work improved the society? In the end I'll still be stuffing myself with delivery sushi and roaring a big car on the highway – thanks to the growing supply of more and more cheap labour.
I've now digressed very far from the original discussion. But being aware of this is an endless source of frustration for me, and every discussion about "what is fair compensation" awakens it :|