Why do you put foil on the edges of pies?

To prevent over-browning. The edges of a pie are often exposed to more heat than the center, which can cause them to brown too quickly and become overcooked. Placing a strip of foil around the edges of the pie before baking helps to protect them from the heat and prevent them from over-browning.

To keep the crust from shrinking. As a pie bakes, the crust will naturally shrink. This can cause the pie to pull away from the sides of the pan and result in a gap. Placing a strip of foil around the edges of the pie helps to prevent the crust from shrinking and keeps the pie intact.

To create a decorative effect. A strip of foil can also be used to create a decorative effect around the edges of a pie. This can be done by cutting the foil into a scalloped or zigzag pattern, or by folding it into a pleat.