However, a joke is more then the jolt of two frames of reference. I found an excellent essay on humor in the Encyclopedia Britannica. Sometimes the aggressiveness in humor is obvious, as in children's practical jokes or in the pratfalls of adults. At other times, it may be more subtle, as when a pun suddenly makes an earnest conversation appear ridiculous. The elements of aggression and apprehension are so universally common in humor that some writers have theorized that its function is to discharge these emotions in a socially acceptable manner.
Laughter serves as a safety valve for the overflow of redundant tensions.
The science fiction writer, Robert A. Heinlein, made almost the same point in his 1961 book Stranger in a Strange Land. I want to paraphrase a story he told in his book. Robert Heinlein invites us to imagine that a highly rational and logical Martian named Mike comes to Earth, where he tries to understand our culture. What humans call humor puzzles Mike. He struggles to understand why we think things are funny.