This is an odd analysis, because as it highlights, salaries are strongly correlated with wealth of the country.
So the question really becomes, not why are salaries different, but "why is programming difficult to offshore".
If programming was easy to import and export then either salaries would even out or, more likely, would be relocated to cheaper countries like many kinds of manufacturing.
But software is difficult to outsource even from one department to another let alone between companies or countries.
If you can solve outsourcing, then you've solved the problem of knowing what you want from software.
But if you've done that, you've just become the software engineer.
So the question really becomes, not why are salaries different, but "why is programming difficult to offshore".
If programming was easy to import and export then either salaries would even out or, more likely, would be relocated to cheaper countries like many kinds of manufacturing.
But software is difficult to outsource even from one department to another let alone between companies or countries.
If you can solve outsourcing, then you've solved the problem of knowing what you want from software.
But if you've done that, you've just become the software engineer.