The first rise gets the yeast growing and multiplying. Then you punch it down and let it rise again,
to redistribute the yeast cells and get a more even texture. This second rise is usually in the shape of the loaf, whether it's in a pan or free-form. The loaf will rise more in the oven but it needs to double in size first on its own, otherwise you'd be sliding unrisen dough into the oven and get a very dense result.