The humor from many jokes comes from twisting an expected outcome around. Your example flips the cause and effect— in the first sentence, the cause is not ‘going anywhere’ and the effect is ‘having curry for dinner’. Then it’s revealed that having curry for dinner is actually the reason for staying home.
Well, Heinlein 's assertion is humor is something bad happening to someone else, so for those who aren’t me, it’s funny. (Mind you, I say this from the loo. “Plop, plop…Oh, what a relief…”)
Why do giraffes have such long necks?
Because their heads are so far away from their bodies.
I tell this to my high school students and inevitably one student laughs and the others think it’s s real explanation.
A non sequitur (English: /nɒn ˈsɛkwɪtər/non SEK-wit-ər, Classical Latin: [noːn ˈsɛkᶣɪtʊr]; “[it] does not follow”) is a conversational literary device, often used for comedic purposes. It is something said that, because of its apparent lack of meaning relative to what preceded it,[1] seems absurd to the point of being humorous or confusing. This use of the term is distinct from the non sequitur in logic, where it is a fallacy.[2]
Another actual conversation (which I have shared before):
Nephew: Are there porcupines in Michigan?
Me: I think so. I know they live near mountains.
Nephew: Are there any mountains in Michigan?
Me: Yeah, in the Upper Peninsula.
Nephew: What are the mountains called?
Me: Porcupine Mountains.
I remember a non-observant Jew on this message board talking about how he was going to fast anyway on Yom Kippur, because how else would he have room for the big feast on the next day when you break the fast?
A conversation I had when I was teaching English in Czechoslovakia:
SHE: You know there are two kinds of cherries, red and black? ME: Yes… SHE: What are they called in English? ME: Red and black cherries.
When I saw she obviously didn’t believe me, I added “Or sweet and sour.” (Czech, like Russian, has a different word for each variety.)
Another time:
SHE: You know the men who do manual labor at this school? ME: Yes… SHE: What do you call them in English? ME: Engineers.
When I saw she really didn’t believe me, I added “They used to be called ‘janitors,’ but they don’t like it because they do more than just clean. They keep the physical plant running.” (Calling someone an “engineer” in Czech apparently implies they have some kind of specialized higher education.)