Joking aside, this is Marvin Minsky's paper "Jokes and their Relation to the Cognitive Unconscious", published in Cognitive Constraints on Communication, Vaina and Hintikka (eds.) Reidel, 1981:
>Abstract: Freud's theory of jokes explains how they overcome the
mental "censors" that make it hard for us to think "forbidden"
thoughts. But his theory did not work so well for humorous nonsense
as for other comical subjects. In this essay I argue that the
different forms of humor can be seen as much more similar, once we
recognize the importance of knowledge about knowledge and,
particularly, aspects of thinking concerned with recognizing and
suppressing bugs -- ineffective or destructive thought processes.
When seen in this light, much humor that at first seems pointless, or
mysterious, becomes more understandable.
[...]
>ACKNOWLEDGMENTS: I thank Howard Cannon, Danny Hillis, William Kornfeld, David Levitt,
Gloria Rudisch, and Richard Stallman for suggestions. Gosrdon Oro
provided the dog-joke.
There used to be a joke in French, popularised by comic book author Gotlib afaik, that went like that:
"Why do ocean liners have 3 big chimneys? Because Transatlantic!"
You could replace the question with anything nonsensical. In the comic, a father becomes crazy after his son tells him this joke. He just wants to understand it so bad...
How many pancakes does it take to shingle a roof?
Orange, because snakes don't have armpits!