"pastry," c.1300, from M.L. pie "meat or fish enclosed in pastry," perhaps related to M.L. pia "pie, pastry," also possibly connected with pica "magpie" (see pie
(2)) on notion of the bird's habit of collecting miscellaneous objects. Not known outside Eng., except Gaelic pighe,
which is from Eng. In the Middle Ages, a pie had many ingredients, a pastry but one. Fruit pies began to appear c.1600. Fig. sense of "something easy" is from 1889. Pie-eyed "drunk" is from 1904. Phrase pie in the sky is 1911, from Joe Hill's Wobbly parody of hymns. Pieman is not attested earlier than the nursery rhyme "Simple Simon" (c.1820).
"magpie," mid-13c., from O.Fr. pie (13c.), from L. pica "magpie," related to picus "woodpecker," Umbrian peica "the magpie," Skt. pikah "Indian cuckoo," O.N. spætr, Ger. Specht "woodpecker" (see magpie
printers' slang for "a mass of type jumbled together" (also pi, pye), 1659, perhaps from pie (1) on notion of a "medley," or pie (2) (see pica
1382, as if it were the pp. of a verb form of M.E. noun pie "magpie" (see pie
(2)), in ref. to the bird's black and white plumage. Earliest use is in reference to the pyed freres, an order of friars who wore black and white. Also in pied piper (1845, in Browning's poem based
on the Ger. legend; used allusively from 1942).