The foil is placed on top to prevent any condensation from forming on top of the cornbread. When covering the cornbread, make sure you leave enough space for it to rise in the pan while it cooks.