Yes, and?
You're describing the state of things and the law as if that makes it a good thing and an optimal situation. It's neither.
All kinds of very good things were no legal obligation for businesses to perform (like no obligation to not use child labor, or to have filters in your factory's chimneys), and all kinds of very bad things were an obligation for businesses to do (like seggregated areas), at different times.
If they want to, Microsoft employees could unionize to make sure the company can never fire any of them, but of course that would mean saying goodbye to all those juicy jobs with compensation packages that make big-tech and the US attractive places for lucrative business in the first place.
Nobody forces you to choose to go work at Microsoft or any big-tech that focuses on pleasing Wallstreet. People go work there because they chase wealth building and that comes with higher risks. You can go work at your local mom & pop SW shop if you want a cushy job for life. Of course you won't get a 400k TC package to buy that dream house either.
From the other perspective, 1 fired person is a lot for a family - especially in a bad economy