"The Hatter opened his eyes very wide on hearing this; but all he SAID was, 'Why is a raven like a writing-desk?'
'Come, we shall have some fun now!' thought Alice. 'I'm glad they've begun asking riddles.' 'I believe I can guess that,' she added aloud.
'Do you mean that you think you can find out the answer to it?' said the March Hare.
'Exactly so,' said Alice.
'Then you should say what you mean,' the March Hare went on."
-- Alice in Wonderland, Chapter VII, by Lewis Carroll.
Alice never did guess the answer; the tea party proved to be too chaotic to focus on the riddle, and the subject quickly changed to other forms of tomfoolery. A bit later in the conversation the Mad Hatter asks Alice if she has found the answer to the riddle, and she admits that she has not. She asks him for the answer, and he admits that he has no idea of the answer himself.
Alice sighed wearily. "I think you might do something better with the time," she said, "than wasting it in asking riddles that have no answers."
Of course, a riddle is designed to have an answer, it's supposed to have an answer, and many of Lewis Carroll's readers believed that even if Alice and the Mad Hatter had no clue what the answer was, surely Mr. Carroll himself would. He was so pestered by readers asking him for the answer that he finally responded in the preface to the 1896 edition of Alice. While he had not originally intended the Hatter's riddle to have an answer, he did admit to having one.
"Enquiries have been so often addressed to me, as to whether any answer to the Hatter's Riddle can be imagined, that I may as well put on record here what seems to me to be a fairly appropriate answer, viz: 'Because it can produce a few notes, tho they are very flat; and it is nevar put with the wrong end in front!' This, however, is merely an afterthought; the Riddle, as originally invented, had no answer at all."
So we finally had an answer. But as it had been admitted that it was only an answer, and not the answer, various wits have spent the following 100+ years in a quixotic search for The One True Answer. In this sort of venture there are no true losers, so I present for you the Raven and Writing Desk Hall of Fame:
Because neither can climb a tree. (Anonymous English children of yore, before 1896)
Because the notes for which they are noted are not noted for being musical notes. (Sam Loyd, 1914)
Because Poe wrote on both. (Sam Loyd, 1914)
Because there is a B in both and an N in neither. (Aldous Huxley, 1928)
Because it slopes with a flap. (Cyril Pearson, undated)
Because they both come with inky quills. (Anonymous)
Because you cannot ride either one of them like a bicycle. (Anonymous, 1930s)
Because they both stand on sticks. (Anonymous)
Because one is a rest for pens, the other is a pest for wrens. (Anonymous)
Because they both have bills. (Anonymous)
Because regardless of your efforts neither is likely to keep you well fed. (jessicaj, 2011)
Because both can be found in parliament. (Uberbanana, 2013)
The list can nevar be complete, and certainly not until you have made your contribution. Please let me know, why is a raven like a writing desk?
Many thanks to The Straight Dope and Martin Gardner's The Annotated Alice, which collected much of this information.