I don't think it is without reason that when American companies fire people, they are not allowed to be around and get all their stuff in a box to not sabotage the company. Such practice is evidence of very weak mutual respect, trust and loyalty.
Ultimately that is a bad way of running an economy. You incur very high transaction costs in business when trust levels are low. I've seen this myself when American companies have been involved in buying Norwegian companies. American companies are completely overdoing it when it comes do due diligence, writing contracts and involving lawyers. This represents a huge unnecessary cost.
This experience is not unknown to others as well. You can read about Japanese experience with American work life. They are also used to a model with high degrees of loyalty. I read about a Japanese company trying to run the Japanese way in the US. They hired people for modest salary because they used lots of money on training to get very skilled employees. The problem was that this model was impossible in the US, because as soon as employees got the skills they switched to a higher paid company, which offered no training. The Japanese company did not understand how to build skills in the US. And rightly so. That is a big problem in the US. A huge part of the population have very low skilled jobs because it is very hard to raise the skill level of employees in the US, when you don't have a high chance of retaining those workers.
Of course there are pros and cons to both approaches. Norwegian and Japanese companies are more likely to keep unproductive workers as you say. But seen from a holistic view, for society as a whole that must be a better approach than producing lots of homeless people, or people living off welfare.