The noun pie denotes a baked dish of fruit, or meat and vegetables, typically with a top and base of pastry.
This word, which appeared in the early 14th century, is of uncertain origin. (No further related word is known outside English; the Scottish-Gaelic pigheann and Irish pióg are from English.)
It is perhaps the same word as the earlier pie denoting the magpie, though the reason for this may be connected with some forgotten piece of folklore. It has been suggested that the dish, which originally consisted of any variety of ingredients, was named by association with the bird either after the bird’s spotted appearance or after its tendency to collect miscellaneous articles.
In this context, it is interesting to note the similarity between the words haggess, a name for the magpie, and haggis, denoting the Scottish dish made from sheep’s or calf’s offal, oatmeal, suet, and seasonings boiled in a bag, traditionally one made from the animal’s stomach. The word haggis is of unknown origin, and haggess is from French agasse, agace, a name for the magpie. (Of Germanic origin, agace is related to Dutch ekster and German Elster, of same meaning.)
It is also interesting to note the similarity between chewet, denoting a dish of mixed ingredients, and chewet, a name for the chough, a bird which, like the magpie, is a collector of oddments. The former word is of unknown origin, and the latter is from French chouette, which now only means owl, but was defined by Randle Cotgrave in A Dictionarie of the French and English Tongues (1611) as meaning
An Owlet; or, the little Horne-Owle; (a theeuish [= thievish] night-bird;) also, a Chough, Cadesse [= jackdaw], Daw, Iack-Daw.
According to Ernest Weekley in An Etymological Dictionary of Modern English (1921), the theory that pie in the sense of the baked dish is from pie in the sense of the bird is also supported by the obsolete French expression découvrir le pâté, literally to discover the pasty, which was synonymous with trouver la pie au nid, literally to find the magpie in the nest, meaning to make a fortunate discovery, to discover a secret.
Weekley also remarks that the printing term pie in the sense of a mass of type in confusion or mingled indiscriminately is pâté in French, and that
pâté is also used of a job lot of curiosities which one buys in hopes of finding some good item in the collection, like Little Jack Horner, who had a finger in the pie.
This is a reference to the following nursery rhyme:
Little Jack Horner
Sat in the corner,
Eating a Christmas pie;
He put in his thumb,
And pulled out a plum,
And said ‘What a good boy am I!’
An alternative etymology was suggested by Charles Harold Livingston (1888-1966) in History and Etymology of English ‘Pie’ (Brunswick Publishing Company, 1959). According to him, baked dish would be a secondary meaning of pie denoting a collection of things made into a heap, especially a quantity of potatoes or other produce formed into a heap, or placed in a shallow pit, and covered with straw, earth, etc., for storage and protection from frost. This word would be derived from an unattested variant pis of Anglo-Norman puz and Old French puis (modern French puits), meaning a pit, a well, from classical Latin puteus, on which English pit is based.
However, pie in the sense of collection of things made into a heap is only attested more than two centuries after pie in the sense of baked dish, and they are perhaps two separate words.