Why does Polly want a cracker?
Where does the expression "Polly wants a cracker" come from? Why is the parrot named Polly, and why doesn't she want seeds?
While there are a number of sources that attribute the origin of this phrase to R.L. Stevenson's Treasure Island (pub. 1883), or alternatively, to the National Biscuit Company (Nabisco, c. 1876) which used it as a popular slogan, neither of them appears to be the right one. As James McLeod has pointed out in another answer, "Polly want a cracker" can be verified to have been in use even before these dates.
The earliest entry in Google Books is from Bunkum Flag-Staf and Independent Echo", a satirical fake newspaper published in The Knickerbocker (or, New-York Monthly) magazine, Volume 34, in 1849. The reference to Polly's crackers can be seen in the following excerpt:
A radio show named A Way with Words has also attempted to trace the roots of this phrase. According to the host, the earliest reference he could find was the following cartoon from 1848 in another satirical magazine named The John-Donkey:
The use of cracker in the cartoon is a pun on the word for the biscuit as well as the fact that the boy is ready to crack the skull of the parrot open, presumably for annoying him (perhaps by asking him for a cracker?). The hosts of the show go on further to make a connection between the use of crackers on ships (as long-lasting food) and perhaps parrots being on board as well. At any rate, they conclude that even in 1848, parrots named Polly wanted crackers and that the phrase might have been commonly used.
Now, cracker biscuits were invented in 1801 (or perhaps earlier in 1792) which should date this phrase. Incidentally, the use of the name Polly for a parrot can apparently be dated to at least 1606 to Ben Jonson's play, Volpone. According to the source, the OED (somebody please clarify) expounds on this matter thusly:
Polly is a diminutive of Poll "as a female name, and name for a parrot," and Poll, altered from Moll, familiar form of Mary, is the traditional name for any parrot. The earliest quotation the OED gives for Polly as a name or designation for a parrot is from Ben Jonson's "Epigrams," 1616.
In conclusion, there is no concrete proof of the exact origin of the phrase. However, my best guess is that crackers became the staple food/snack for pet parrots who ended up parroting their owners during feeding time - "Polly, want a cracker?". I believe that the phrase was popularised by Nabisco's slogan and has been in use ever since. In other words, this exercise was quite pointless; but, I wouldn't have it any other way :)
I'm not a parrot-fancier, but I suspect it may be easier to get a parrot to produce a recognisable rendition of the word "cracker" than "seed".
Parrots can be taught to say all sorts of things. I remember being in a dingily-lit country pub many years ago. Myself and my lady companion seemed to be the only customers, but every few minutes a voice coming from somewhere in the murk kept saying "I've got my beady little eye on you!".
We were excruciatingly embarrassed for some time (we certainly stopped canoodling in the corner!). But then we heard "Pieces of eight! Pieces of eight!", and it finally dawned on us! Strangely, as I recall, it never said that other old standard for parrots - "Who's a pretty boy, then?"
The earliest reference I can find is 1859, but I should think it was a fairly standard thing to teach parrots long before that. Bear in mind that usually (always?) the parrot has no concept of the meaning of whatever it says - after all, it is a bird-brain.
The owner of that bar obviously thought it would be fun to have his parrot say something that might sometimes seem "context-relevant". Sailors would perforce eat "crackers" (dry hard biscuits, suitable for long sea-voyages). Our archetypal parrot-owning sailor would thus have them on hand to offer as a reward when training the parrot; naturally he'd start by teaching it to ask for them. Besides – poor fare though it might be – he'd only have a limited ration of crackers (as with his rum ration). He'd want to get his parrot up to speed with "Polly wants a cracker", if only so his ship-mates would say...
"Ah! Isn't he cute! He wants a bite of our hard tack, too!"
...and offer the parrot bits of their ration.
Okay - I know archetypal sailors would say "Arrggghhhh!", but the point is they probably wouldn't have seed on board, so the "anthropomorphism" wouldn't work with that version. And the parrot often wouldn't be saying either version because he actually wanted anything to eat at all, let alone a specific food (he just likes attention). So from his point of view it's irrelevant what word he says.
As regards why "Polly" is a traditional name for a tame parrot, OED has this to say...
Poll [An alteration of Moll, a familiar equivalent of Mary: cf. Peg = Meg, Margaret.]
A familiar equivalent of the name Mary (see also Polly1), used as the conventional proper name of any parrot; hence, = parrot. So Poll-ˈparrot, also used fig., and attrib., with reference to the parrot's unintelligent repetition of words.
Why is the parrot named Polly?
The OED's earliest quote for Polly (a parrot) is from 1826, but in the etymology section says Ben Jonson used it in his 1616 Epigrams referring to two people, a Robert Pooley and a Parrot, and that there may be a pun:
And we will haue no Pooly' or Parrot by.
Further, it notes Johnson's use of Poll (a name for a parrot) Every Man Out of His Humor from 1600:
Fast. Would you speake to mee Sir?
Carl. I, when he has recouered himselfe: poore Poll.
So the female forename Polly comes from the female forename Poll (also Pall), and was originally a rhyming variant of Moll, which is a diminutive of Mary.
Daniel Defoe's Robinson Crusoe (1719) named his parrot Poll and taught him to speak, and in a much later 1894 children's version the parrot said "Polly wants a cracker, cracker."
(The OED's earliest quote for cracker (thin hard biscuit) is from 1739.)
Why doesn't she want seeds?
Polly didn't demand a cracker. In 1831 she wanted breakfast and tea, according to the The London Literary Gazette:
A friend of mine knew one that had been taught many sentences ; thus - ' Sally, Poll wants her breakfast !' ' Sally, Poll wants her tea !' but she never mistook the one for the other ; breakfast was invariably demanded in the morning, and tea in the afternoon.
I am not sure if it is possible to answer this question. "Polly" is a traditional name for a parrot, dating back an awfully long time (as is the expression, as shown by this Google NGram.
Perhaps a cracker is a special treat to be offered as a change from seed?