Cleverness: I'm funny and I'm confident enough in it to risk doing it publicly
Status: The statuses of you and Bob allow you to play a joke on them. Often such jokes are a public demonstration of status, like children do more explicitly and often unconsciously in the schoolyard.
Empathy: 'I say suffering is funny'; it asserts a willingness to violate a taboo, be unempathetic, and therefore potentially dangerous
Personal power: I'm powerful and independent enough to do something on a whim
etc.
It’s a whole class of shitty jokes where you mess with people under the entire purpose of doing it without them knowing. If Bob knows he’s being messed with, that’s something completely different.
I don't see where it's expressed above (?); no willfullness involved - I didn't even realize that you thought were having such a heated discussion. The other commenter also didn't pick up on it either.
If I’m talking about a class of things explicitly defined by having attribute X and someone comes in and says “I don’t think that has attribute X”, that’s willfully if ignoring what is being discussed.
Also, don’t give a lecture about making up people’s state of mind and then pretend I think I’m having a heated discussion. It’s not heated, I’m just explaining in the simplest terms possible that there is a class of jokes where the subject does not know a joke is occurring. It just seems heated to you because you don’t like being told you’re missing the point.