Suddenness, astonishment, irony

If you hear the joke for the second time, it doesn't seem to be funny enough, does it? And it's not that enthralling, is it? So, it is suddenness that makes wit so humorous and attention-catching. If the ordinary situation turns out to be unpredictable or even opposite to what one would expect being put in the proper literary form, it becomes a witticism (a winged word) that may enter history having made its author famous posthumously.
Isaac Asimov suggests in his "Treasury of Home" that the core of the wit is anticlimax: a sudden change in standpoint meaning to elevate trivial things and reduce the importance of really essential ones. In other words, according to I. Asimov, witticisms are based on the "opposite" effect. For suddenness and astonishment, anticlimax is the most effective literary device.
In the same way, taboos turn out to be one of the best targets for wit. As usual, people make a lot of fun grounding on them. Sometimes, the situation may even involve some sacred things, including the Bible, Koran, and some other ones.
Remember a lot of lines starting: "Moses and Jesus play golf", or "A priest, a rabbi, and a lawyer receive an audience with a king...".
This phenomenon explains good results of most of comedians and wits who are well aware of the culture and specifics of the public they work for.