With contracts, it can become practicably impossible to fire someone.
It was that way where I worked (unless you were a white male of course). I went through the process of trying to fire a completely inept and useless worker (he was a white male) and it was an almost full time effort. I had 8 other people to manage at the time, and it was exhausting, and the Company "resources" were no help either.
This guy was a danger in the lab, I had to tell him to sit in his office and do nothing. Someone else had hired him and he got dumped on me. We didn't have a union, but we had a worse than useless group of idiots running HR. We'd get wildly differing instructions from them week after week.
None of that was union related, but I can easily see how a union contract can obstruct firing worthless workers. Management just loses interest and says "Well, just put Bob in an office doing nothing." It's demoralizing to everyone else aware of the situation.
I had to deal with a fellow in another group, and he was never around. I kept asking where he was, he had results I needed, and his coworkers would laugh at me. Nobody would say anything because he was black. I went to his boss and got the run around. I finally managed to get the data I needed and moved on. It turned out, I learned much later, this guy, a PhD chemist, was flipping houses and never came to work. He realized they couldn't/wouldn't fire him, so he snagged a nice salary and flipped houses.
He NEVER came to work, not even an hour a week. The rest of the chemists in that group knew not to say anything about it. This went on for two years, and then he finally left, the reasons were not revealed. He was untouchable. This sort of thing was uncommon, but not unprecedented.