Leavening is a fermentation from the chemical point of view and fermentation takes place at sugar load with the starch.
Biological agents that operate the leavening are mainly mushrooms belonging to the family of Ascomycetes, especially the saccharomyces species ceresiae, the common yeast (also used in the baking industry because it is rich in vitamin B).
These micro-organisms use starch to obtain energy and organic materials in order to grow.
The use of starch leads to the formation of carbon dioxide and alcohol. Both these compounds tend to evaporate and to move away from the dough. If the flour is rich in gluten evaporation is very limited and the bread that you get after cooking will mellow as full of empty spaces left by the gas. If the flour is low in gluten dough tends to crack and let out carbon dioxide which evaporates.
Flour from wheat are rich in gluten, therefore suitable for the production of bread.
Flour from hard wheat are less rich in gluten and therefore less suitable for breadmaking; are used for the production of pasta.