Sorry but H1-B aka corporate slavery is abominable in the first place. That it is the way it is doesn't mean it is fair or ethical. Most other countries have moved to a more humane way of dealing with foreign workers, at least qualified immigrants where you don't immediately lose your entire life that you've built because of a layoff.
If the answer is, well we're the US and this is the law here, well...