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:
This man from J. Bird Creek, Florida walked in this bar to get a whiskey. A drunk came up and said, “Do you live around here, or ride a bicycle?” The man said, “You must feel good today.” The drunk said, “Yes, when my wife went to work she said, I want the house cleaned today,” so I am going to stay in this bar and drink until about ten minutes before she comes home, and then I will clean the house and do some cooking and feed the dog.
The Spout Spring and (As A Bonus) Too Poor To Paint Too Proud to Whitewash by Mark Royston - 2003:
Bill and Meta had moved into the Shipe place around 1938. I remember the first time I met Bill and for some reason his first words to me, “Do you live around here or ride a bicycle?”
A snippet in The Gargoyle, Volume 18 - 1924 is a slight variation:
"Say, Jack do you live in town, or ride a bicycle?' "Don't get funny, boy, or I'll send your floating rib to shore." "Try it once ...
Here's some recollections from around the web of (mostly) grandparents using the phrase.
Here's a 2004 forum post:
My old man would greet people he knew (and some he didn't) bysaying
"Do you live around here or ride a bicycle?" and he was the only one who thought it was funny. I must have heard it 10,000 times.
A 2006 commenter offered this as an example of idioms about idoits:
My Grandpa taught me one to keep the stupid guessing: "So, do you live around here or ride a bicycle?"
The obituary for John Albert Oden (1923 - 2010) says:
John was a storyteller and spun such great tales of his childhood in Mississippi and his Navy days. He had many unique phrases like "Great gobs of sheet iron!" and "Quit Helen Cynthian around" with tales to go with them. He also loved to tease kids with, "When I was a little girl" and "Do you live around here or ride a bicycle?" We will all find ourselves repeating his silly phrases and fascinating stories and hopefully passing them on.
Descendants of William Lake on Family Tree Maker says:
MAMIE ALTA LAKE was born November 29, 1899 in Marion County, WV, and died October 22, 1960 in Marion County, WV. She married HAROLD WAYNE CARPENTER January 01, 1921, son of AUGUSTUS CARPENTER and ALLIE COOMBS. He was born November 20, 1898, and died July 07, 1964. ...
From the author (L. Rex Lake): One of Aunt Mamie's favorite sayings to me when I was just a little guy was "do you live around here or ride a bicycle". I later used it on my own kids and grandkids.
Here's a variation in a 2003 post on Heartwarming vintage catch phrases:
Grandpa used to ask: Do you live at home or ride a bicycle?
That always made my mom laugh but I never got it as a kid. And
From a 2012 comment:
Reminds me of my father. He'd ask my friends at their first introduction, " Do you live around here or ride a bike?"
"Walk to school or carry your lunch?"
I miss him.
And in the obituary (PDF) of Rick Fruin:
Richard Albert Lloyd Christopher Fruin was born on July 2, 1928 in Walkerton, Ontario. ...
No recollection of Rick Fruin would be complete without remembering his wit. Many calls to his ofﬁce were answered with “Richard Albert Lloyd Christopher Fruin” just in case you weren’t sure who you had called. All his friends will remember, after having arrived to see him, being asked somewhere in the conversation “do you live in town or ride a bike?” If you did something nice for Rick you may be rewarded by being told that “your kindness and generosity are only exceeded by your personal pulchritude”. Puns were especially favoured by Rick although most were real groaners; that was a large part of their appeal. The worse they were, the funnier they were!
Non sequiturs can be funny. Here's one I thought of spontaneously:
"Do you stop beating your wife when you're eating ice cream?"
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.