“Welp, you broke production. Pack your things, you’re fired.” Ugh, when was this humour ever funny? I'm a manager, I like to joke around with my team. There's a lot of comedic ground to cover before you start joking about people being fired.
Especially if you're used to being playful with humour and words, and acting like mates humour at each others' expense.
Jokes about performance and firing have a much bigger impact than the inexperienced manager realises. But I think it's not great when non-managing peers do it to each other either.
Unless there are really well established relationships and a good track record at work, there's going to be some background thought, conscious or unconsciously adding a little stressor: "I wonder how much they really mean it" and "I wonder if my boss thinks like this too".
A lot of people have imposter syndrome already. It doesn't take much to add a bit more.