I got fired once
I got fired from one of the companies in the past. That became a funny story to tell during job interviews and parties.
I think... company owners who fired me made the call because they believed it was the best possible decision given the context, information, skills and plan for the future they had. And they could do it.
Recently, there have been many stories about people getting fired in IT.
No matter the reasoning behind all the layoffs - performance, budget, personal, manipulated or someone having a bad day.
Bosses do it because they believe this is the best possible step for the company.
Often, this decision is not about you. It is about the company.
Sometimes they are right. Sometimes they are wrong.
Like all humans.