@kplax,
It could be a coping mechanism to deal with painful/uncomfortable issues in our lives. If you think about the things that most often come up in comedy routines, it's quite often hardship, fears, painful experiences. Comedians quite frequently suffer from depression. Perhaps humor has an evolutionary benefit when it comes to dealing with psychological discomfort.
I think of Chris Rock talking about how everyone has a "molester uncle". Now, pedophiles are normally our worst fear, but that bit was hilarious. "Walk it off!" lmao