When visas are tied to jobs, getting laid off means something completely different—even in a good labor market. I had to move from the US to one of those countries with strong labor protections. But I agree that salaries take a massive hit because of this, and opportunities are reduced too.
I’ve seen the opposite as well—people losing their residence permits and healthcare coverage, and then going bankrupt after a layoff. For me, lower pay for better labor protection is a sensible tradeoff. But of course, your mileage may vary.