This comes from a brazilian saying. It basically means that if you're making jokes and someone gets offended ( on a personal level ), that is no reason to stop making those jokes. This, of course, isn't an excuse to just be an asshole, and must be used with nuance. The saying could also be directly translated to
"It's better to lose a friend than to lose a joke"
Guy 1 (whose wife died to stillbirth): Wow, these celebrities are crazy
Guy 2: What happened?
Guy 1: I checked the news, and it looks like the rapper DaBaby killed his wife
Guy 2: Well, "The Baby" also killed YOUR wife
Guy 1: Low blow dude
Guy 2: It's better to miss a friend than to miss a joke