> You have to compare the salary to local living costs to be comparable.
This is not accurate in a globalized economy, where purchasing power parity (PPP) becomes a bit of a lie. No one is going to ask you if you're from Cambodia or another country, when you'll want to rent a server from AWS, or buy an iPhone, or maybe even a car. Global corporations aren't running charities and are instead concerned with making their products profitable - if anything, they would only use your location to increase the prices of products further if you're capable of buying them, but that's not a widespread practice nowadays for a variety of reasons.
I actually wrote a bit more about it in my blog article, "On finances and savings": https://blog.kronis.dev/articles/on-finances-and-savings
which showed how much money i've made over the years while working as a software developer in Latvia (currently around 18'000 euros a year), which means that my ability to make savings is ~5x lower than many of the software developers in the US or other well paid countries - which directly impacts my ability to create a startup and pay for external services/infrastructure, should i so choose.
Of course, on the flip side, one can also talk about how much you're disadvantaging yourself by catering to a clientele of local companies: i generate my company ~20x less profits than an average engineer in Google would for their company.