When you add yeast to dough, the yeast eats simple sugars that are present in the dough like glucose. They also give off enzymes to break down the starches in flour that are inside the dough so they can eat more glucose. The products of that process is carbon dioxide, which leavens dough. When you punch down the dough, you release the gas inside the dough. This is so you prevent the yeast from killing themselves with excess carbon dioxide, and gives the yeast new pastures to eat glucose and produce carbon dioxide. Basically, the yeast breaks down the starches in flour so that they can eat, and in the process they leaven the dough. Degassing prevents the yeast from killing themselves and provides them new areas to break down the starch.