While I agree that there are many incompetent people who have abused H1B and other such systems, I prefer to judge people on their individual merits and avoid stereotyping. I have worked with both the extremes.
See my longer response to the OP
That is strange. In my experience, H1Bs are let go as quickly as natives if they are not competent. Of course, it could simply be a matter of the type of companies we have worked with. Again, see my (longer) response to the OP. I have mostly worked with Type 1 people I described there and have been fortunate enough to mostly avoid the Type 2. That said, I’ve worked with both extremes.
EDIT: When I say I’ve worked with both the extremes, I mean I have worked with both highly skilled and totally incompetent foreigners as well as natives.
EDIT 2: I’ve also worked with a third category — highly intelligent people (PhD level) who are more interested in spreading their intelligence (i.e. showing off) than getting actual work done. Unfortunately, I haven’t met the other extreme in this case. :-)
Spending an evening reading stories reported at thedailywtf.com will help dispel this.
When given the opportunity, the learn and perform.
Also they work for whatever salary you offer, do not complain, do overtime and weekends whenever demand and most importantly do not complain.
Learning to write bash scripts isn't that hard. Finding people grateful enough for the opportunity offered, who work to make you and them win is hard.