Came across this in Jasper Fforde's "The Eyre Affair," which I'm reading avidly at the moment. Two replies are given in the book - "because Poe wrote on both", and "becausethere's a 'b' in 'both." Hilarious - but I then couldn't remember where I'd seen the riddle before - felt convinced it was Alice in Wonderland and of course it was. In fact, there seems to be a wide variety of possible answers, but I prefer the thought that there wasn't intended to be an answer at all, it was just some of Carroll's nonsense.
The Eyre Affair is great though - it reminds me of the Aberystwyth books I've read recently as well - the worlds they're sent in are close enough to reality to seem familiar and recognisable, but there are strange quirks which make them something else entirely, like magic being real, or a glut of cloned dodos. Just enough unreality.