I personally have no trouble asserting that the worst Indian developers are worse than the worst American developers without making any claim about average quality. There is a large cohort of developers in India and other third world countries whose main exposure to programming concepts is poorly taught classes with sometimes hundreds of students to an instructor for instance. That kind of thing simply does not exist in that capacity in the west. Minimum wage laws and such are also a contributor here, people of such poor skill are simply not employable in the west because the price floor for employing someone is so much higher.
None of this has anything to do with race or ethnicity, only societal wealth and development inequalities.