The instruction to keep butter cold appears in nearly every pastry recipe, usually without explanation. What the cold is protecting is the physical separation between fat and flour.

Flaky layers are made by pieces, not by mixing

Rubbing cold butter into flour produces flattened fragments of solid fat coated in flour and separated from each other, rather than a uniform blend.

When the pastry is rolled, those fragments smear into thin sheets that lie between sheets of dough, and the finished raw pastry is effectively a stack of alternating layers.

Warm butter cannot do this, because it softens and merges into the flour instead of staying as discrete pieces, producing a dough that is uniform all the way through.

Steam does the lifting in the oven

Butter contains a meaningful proportion of water, and when the pastry hits oven heat that water turns to steam and expands violently within each fat layer.

The expanding steam pushes the dough sheets apart, and the starch and protein around them set in that separated position before the pressure subsides.

The gap left behind when the steam escapes is the flake, which is why flakiness is essentially a record of where the butter pieces were sitting.

Warm fat coats flour and blocks gluten instead

Fat that has melted spreads over flour particles and waterproofs them, preventing the proteins from linking up when liquid is added.

That produces a short, crumbly, sandy texture rather than a layered one, which is exactly what is wanted in a biscuit or a sweet tart base.

Both outcomes are legitimate pastry. The temperature of the butter is what selects between them, and it is why the same three ingredients give two different results.

Hydration and handling decide whether the layers survive

Water allows gluten to form, and some gluten is needed to hold the sheets together, but too much makes the dough elastic and it will contract in the tin.

Working the dough warms it, and every extra minute of handling moves the butter closer to the temperature at which it stops behaving as a solid.

Resting in the cold between stages lets the fat firm again and lets the gluten relax, which is why the waiting steps are not optional politeness.

Oven temperature has to be high at the start

Steam has to be generated faster than the fat can melt out, so the pastry needs to meet strong heat immediately rather than warming up gradually.

A cool start allows butter to run out into the tray, and the dough collapses into the space it should have been holding open.

This is the same logic that puts pastry near the top of a hot oven and explains why opening the door early is more costly here than in most baking.