Arguably, the purpose of a company is to generate profit. If US companies need skilled workers that they can't find locally, they will open or expand their international offices. At least the O1/H1B visa holders pay taxes in the US and contribute to the local economy.