The problem comes when these individuals are more valuable not because equivalent talent wasn't available but because they're slave-like workhorses without flexibility or options.
H1B offers companies power of employees that they simply cannot wield over American employees, period. This is especially popular in some industries. Look at the IT work force here in midtown Manhattan for example.
It's complicated.
You have to include price. Otherwise, the statement doesn't really mean much.
I understand that employers must pay the prevailing wage, but a "shortage" probably indicates that the prevailing wage is too low. It's also easy to pay the "prevailing wage" for a job title that is actually lower than what you're hiring for (the oversight on this sort of thing is pretty weak).
There are also other compelling reasons. A key developer actually has a lot of power over an employer at a certain point in product development. If they walk, they can do a tremendous amount of damage. So employers may vastly prefer a situation where an employee is dependent on them for a visa or green card sponsorship. H1Bs can jump ship, but it's harder than it is for full citizens or permanent residents who can change jobs freely. While it isn't total control over the employee's freedom, it does give the employer considerable power, and they take some comfort in that.
So.. why would a company pay a small amount in legal fees to hire a worker who can be paid considerably less than a permanent resident would be paid, and who will have a harder time leaving the company for a different job? That's not hard to understand at all.