Well, if you look at the Google top management page you can count more Indians than Americans. Probably, just an speculation, there are more ways to be a developer in India, more people, and that produces a wide range of skill levels.
I know exceptions. For example the Argentinian outsourcing company Globant had an excellent staff and they have low wages. Obviously the employees move to other companies once new opportunities arises.