My take on all of this is that bringing in foreigners in this way destroys the whole supply and demand setup of jobs and employees.
As an example, let's say company A wants to hire a salaried employee for $x. After 6 months of not finding anyone, they should offer more money, etc. until eventually someone is found. If this is across the country for a given profession, then more students will be educated in that field, and the supply of employees will match the demand that has grown and salaries will go up and down in relation to how well the supply matches the demand.
With programs like the H1B and similar, when Company A doesn't find an employee for $x, they don't have to offer more money, they just bring in someone from overseas. In this way Company A is getting employees for less than the supply/demand equation says it should be able to in their local country.
This means Company A makes bigger profits, and people inside the given country are now earning a lower wage than they otherwise should be if Company A had to raise salaries because of a lack of supply of employees for the demand in the given field.
Here in Canada it happens all the time. All the big players (McDonalds, Wal-Mart, KFC, etc.) have an agreement with the govt. where they don't even have to go through the process to hire a foreign worker, it's automatically rubber stamped. When they can't find a local to work for minimum wage, they just bring in a foreigner to do it. So now even though there is not a supply of Canadians willing to work at KFC for minimum wage, KFC can fill those positions, have higher profits, and there are thousands (millions?) of people living in Canada with a standard of living below that which the average Canadian will accept. In my town tehre are lots of foreigners living 10 to a house because they don't earn enough money to do it any other way.
This is not a good thing for a country, or the people in it. It is a good thing for the big companies that now make bigger profits, thanks to being able to get employees at a lower salary.