I'm currently working at a major US tech company, and have worked at 2 other major US tech companies prior to this, and in every case except one, the source code I have inherited from some in-house coder is utter crap. Magically, every one of these in-house coders has an "Western" name, one was Canadian, the rest American. I'm talking about single source files for thousands of lines of code, 10+ classes (many unrelated to each other), functions written by copy-pasting the internal code of other deprecated methods, so that even if the deprecated methods are removed, the code lives on disguised under a different name. These guys couldn't even just call the deprecated methods, they had to copy-paste the internal implementation so that the ugliness of their work wouldn't be easily apparent. I've inherited code where the nuts and bolts were wrong, e.g. wrong numerical integration routines, incorrect convergence on non-linear curve fits, etc. were just wrong, but it would have been painstaking and laborious to figure that out and verify the results, so of course, those in-house coders just skipped that part. In another company, these in-house coders developed, over 2 years, a solution to synchronize databases, which required data transfer to the tune of 16x the total size (in bytes) of the database - involving a lot of unnecessary XML conversions, and it too had a lot of copy-pasted code. So strangely, some of what the HCL CEO has said is true, as much as I hate to admit it.
For some companies, the reason for outsourcing is that in the end, GOOD coders are rare, and BAD coders are plenty. That's true in the US as it is overseas. Why pay top dollar for bad code in the US when you can get similarly bad code by outsourcing for much cheaper? Many US companies offer fairly competitive starting salaries, at least twice as much as the 35k or 40k reported here for other software houses, often more, if they can find those GOOD coders here locally. It is simply that GOOD coders are in fact rare, and many companies recognize that. So I can see why they might as well just outsource since the quality isn't going to be much better by recruiting an army of (expensive) BAD coders locally.