Firstly, right now in India, programming(Computer engineering) is one of the most widely adopted courses. This obviously means a lot of programmers and a lot of web shops, IT services and whatever. More the companies, more chances of you ending up finding a mediocre one.
Most of these companies and their employees consider it as a 9-5 regular job. It is a chore. They do not care about you or your product. As long as project managers meet the deadline and programmers get their salaries, no one cares. Not everyone can be a "hacker".
You outsource to India to save money. You wont outsource to India if a developer/company charges the same as its US counterpart. So you end up outsourcing to mediocre companies eventually.
I have interviewed at a really big Indian IT company and their interview process made me realize that they weren't serious about hiring talent. They just wanted more people, whom they'd eventually train to 'get shit done'. For more clarity, I was asked about movies and stuff in my technical interview which lasted 15 minutes and then I was offered a job. No kidding.
There are some brilliant Indian programmers too. You probably wont ever outsource to them because they are expensive.
In a country of a billion people, where computer engineering is one of the most dominant fields and education levels are mediocre, even if 20%(at most 50%? lets not get our hopes high) of each class produces absolutely brilliant engineers, that still means a huge number of crappy engineers.
So while there are brilliant, good, bad and horrendous programmers in India, the math totally inclines towards you finding bad programmers more often.