Let's be clear here. We are talking about H1B program, not outsourcing. Companies outsource entire department to save costs, because they can pay less to equivalent workers overseas. On the other hand, when sponsoring a H1B visa, the employer has to show that the guest worker gets the prevailing wage, on par with all the "similarly qualified" U.S. citizens in the same business. On top of that, the government increases the application fee every now and then to make it costlier to hire H1B workers. In general, it's actually more expensive and difficult to hire a truly qualified H1B employee. Nobody would hire a permanent employee holding H1B visa unless they can't find anyone else equally competent. If anything they've probably already prioritized the H1B holders in their layoff plan, because it makes business sense.