My grandpa used to ask "Do you live around here or ride a bicycle?" fairly often, finding it hilarious (him and only him). While it is quite an awkward, malformed piece of logic, what is its source? It seems to exist as a phrase more often than chance, occasionally in humor/"wit" books.
It's a nonsense set question often used on a first meeting to break the ice or to amuse children. Many people recall their grandfather using the phrase. I've only found examples from the US.
My Best Jokes and Humor: A collection of My Forty Five Years in the Barber Shop by Claude L. Greene - 2010:
The Spout Spring and (As A Bonus) Too Poor To Paint Too Proud to Whitewash by Mark Royston - 2003:
A snippet in The Gargoyle, Volume 18 - 1924 is a slight variation:
Here's some recollections from around the web of (mostly) grandparents using the phrase.
Here's a 2004 forum post:
A 2006 commenter offered this as an example of idioms about idoits:
The obituary for John Albert Oden (1923 - 2010) says:
Descendants of William Lake on Family Tree Maker says:
Here's a variation in a 2003 post on Heartwarming vintage catch phrases:
From a 2012 comment:
And in the obituary (PDF) of Rick Fruin:
Non sequiturs can be funny. Here's one I thought of spontaneously:
The normal configuration of the above would be "Do you stop beating your wife on the weekends?"--which of course cannot be answered with a simple yes or no without incriminating yourself. That in itself is kind of funny.
Your grandfather's locution, however, is funny because like the example I've given, the second part of the question does not follow from the first. That's a non sequitur.
I can't resist: "Are monkeys just stupid, or do bananas taste better when they're green?"
How about "Roses are red, violets are blue, and you're ugly!"
I do not find the logic at all malformed. It is certainly not a non sequitur.
If a person (I imagine a friend of the speaker's children) was constantly underfoot, then either he lives in the area or makes an effort to travel there frequently. Since few people walk for pleasure, the speaker infers that the visitor has a ready means of personal transport, viz a bicycle.
So it is a mildly sarcastic way of drawing attention to annoyingly frequent visits. Half a century ago, my grandfather would ask Don't you have a home to go to? in the same tone.