Why do things cost less when bought in bulk?

You've probably noticed it at the store: one cookie costs a dollar, but a whole box of twenty cookies costs just ten dollars. Buy more, pay less per cookie. It's one of those things that sounds backwards until you know the secret — and the secret lives in factories, trucks, and a very smart kind of math that stores use every single day.
Let's start with how a cookie gets to the store. First, a factory mixes flour and sugar and chocolate chips in enormous batches — thousands of cookies at once. The oven that bakes them is the size of a small room. One worker can watch over ten thousand cookies baking at the same time. That one worker's salary gets split across all ten thousand cookies, so each cookie only carries a tiny sliver of the cost. More cookies per batch means less cost per cookie.
