"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