To work remotely, there are certain requirements on the life pyramid that need to be fulfilled.
It starts by living on a country whose technology infrastructure makes it possible at all.
Then it follows on how much the tier 1 customers are willing to pay to their offshored devs, with the race to the bottom on the dollar per hour rate.
There is also the culture of the country, if programming is seen as a servant job only used as stepping stone for a real job, or if it is seen as master of universe Silicon Valley style.
Working as software developer is privilege, not seen through the same lens across the world.