Sometimes people joke about things that scare them, or that are painful.
Someone laughing doesn’t necessarily mean that they think a topic is funny. It doesn’t necessarily mean that they take the topic lightly. It doesn’t necessarily mean that they’re ok.
Sometimes, people joke because they can either laugh or cry, and they’d rather laugh. Sometimes people joke as a way to protect themselves, or to seem like they’re above it, or to maintain a boundary with people who will treat them badly if they cry.
An example of this kind of joke is below the cut. It’s an old Jewish joke about antisemitism:
Two beggars were sitting next to each other. One holds a cross, and the other holds a sign saying “Please help a poor Jew." People pass by and even those who didn’t intend to give money to any of them, give to the first to upset the Jew. One good man passes by, gives money equally to both, and then says to the Jew: "Why don’t you change your sign? Don’t you understand that nobody will give you any money?” and walks away. As he goes, one beggar turns to the other and says: “Haim, he would teach US business…”