This is an idiom that has been around for several centuries, and contrary to what many people believe, it is not of American origin. When you say that something is “in apple pie order”, what you mean is that it is in perfect order. Everything has been neatly organised; things are in their proper place.
*Bala puts his desk in apple pie order every evening.
According to many scholars the idiom is a corruption of the French “nappe plie” meaning “folded linen”. But the popular story doing the rounds is that the expression became popular thanks to a Colonial (that’s what Americans were called before they got their independence) wife who lived in New England.
The story goes that this lady was in the habit of baking seven apple pies every Sunday — one pie for every day of the coming week. Once the pies had been baked and cooled, she would then proceed to place them on different shelves. The pie that was to be eaten on Monday was placed on the first shelf, the one to be eaten on Tuesday on the shelf next to it, and so on and so forth. The story goes that this lady was so meticulous that she made sure that all the pies were lined up just right. Hence the expression, “apple pie order”. Interesting story, isn’t it? But then, that’s all it is, a story.