It's certainly not a rule, just an observable phenomena, working in IBM with colleagues in Hyderabad and at Google partnering with Intuit in, IIRC, Bangalore.
It's a cultural difference: in India, people become engineers because it carries prestige. They don't code because they love computing (this is measurable: ask how many outsourced engineers have GitHub accounts). The lack of actual interest in their profession demonstrates itself in their work.
The best Indian programmers I've met have either left India or weren't born there in the first place, in either case I'd consider them westerners.
Just because you might have had exposure to some idiots does not mean you label the whole bunch as incompetent.