The word "pie" comes from the name of the magpie, a bird know for both its variegated plumage and its notoriously messy nest. the reason is that pie fillings are higgledy-piggledy things by nature, in earlier times a pie might often include a great miscellany of meats, vegetables and dried fruits.
Some "pie" expressions still refer to the bird, however. Pied and piebald mean variegated in color, like the black-and-white- magpie. "Pie-eyed." 1920s term for being drunk, probably refers to having spotted or splotched eyes, hence out of focus. Other expressions:
As easy as pie. As easy as making pie, that is--or maybe as easy as eating it.
Pie in the sky. A utopia or promised good times that will never come to be, an expression first used around 1911.
A finger in every pie. An involvement in some project, often with a suggestion of meddlesomeness
Pie-faced. Having a round, smooth or blank face.
Apple-pie order. Everything perfectly in place. It has nothing to do with pies, but apparently goes back to one or another of two French expressions: "nappes pliees," neatly folded linen, or "cap-a-pie," top to bottom ("cap to foot").