Jokes were temporarily ruined for me a while back when I read someone's comment that jokes work because the listener assumes one thing and is then confronted with something different. Take, as a basic example, a knock-knock joke:
Knock knock?
Who's there?
Eileen?
Eileen who? <- At this point we assume that the person will have a sensible name
Eileen Dover <- Hilarity ensues! Her name sounds like "I leaned over"!
For a time I couldn't help but analyse jokes looking for the assumption and the defiance of that assumption. I got over it, but I still find that I look at jokes in that way, so I suppose I appreciate the point that you understand why something is funny, rather than it being funny per se.