The motive of Humor is not just confined to being intelligent, expressing sweet surrender of human limitation, or relieving oneself of stress. It is also a tool by which one can explore the wrong side of human conduct. One can afford to be insincere, insolent, immoral, filled with vices - all in the guise of being humorous.
That knowledge should caution us about the humor and the circumstances in which it is being displayed. It is this way we have a Good Humor and a Bad Humor.
The crooked thinking people use Humor as a means to affirm to themselves their morality-- of not doing anything wrong. They use humor to escape from the guilt of conscience. Humor of a specific kind : Crooked Jokes, Sarcasm and Taunting , helps them to convince themselves of the morality in their immoral actions.
So, while humor is a key aspect of free and open social conduct, and of making an appeal to the mind, humor is also a 'sweet sugar coating' inside of which the venom of anti-social and immoral conduct spreads infection from one person to another.