I've been able to laugh and joke around with people I work with from all over the globe (literally), its one of the most valuable tools I have found to create a sense of ease of friendliness in the workplace. Self deprecating humor is also a great way to show that you don't take yourself to serious and to ease tensions when divisiveness may arise. I think the better suggestion is to not talk about politics and don't gossip.
The problem is that what you think is funny may be uncomfortable to a other people, and for some reason, it's always the funny guy who thinks that the onus is on everyone else to shift their behavior to accommodate his comfort.
It gets worse when half the team is laughing, and the other half are praying for you to be struck dumb already.
It's really not that hard to keep your forms of merriment clean and appropriate, if you are a generally good-natured person that likes who you work with and wants to make them laugh.
That said, there are certainly people that can only perform humor as a zero-sum game. But in my experience they are also generally the kind of people that subject their coworkers to uncomfortable conversations in a myriad of other ways.
If you come into a tight culture of people who will riff all day on harmless puns, or crack references to old Jersey Shore dramas, or whatever, it can be acutely alienating.
I wouldn’t personally want to work in a place so sterile, but I also feel confident in my ability to float around and either find a lively culture that suits me or work my way into a culture that once felt alienating.
But not everybody feels so confident in that, and sterile results-focused work communities get the opportunity to have these people thrive.
That sounds good for those people and for those organizations.
As long as the whole job market isn’t made to look that way, I’m not sure there’s a big critique to make.