From Latin 'pīla' (pillar), via Old French — a column of stacked objects, then any heap.
A heap of things laid on top of one another.
From Old French 'pile' meaning 'pillar, pier,' from Latin 'pīla' meaning 'pillar, stone pier, ball.' The sense shifted from a structural pillar to a column-like heap of objects. Key roots: pīla (Latin: "pillar, pier").