Home cooking

So confused with the sorcery of how some dough that was rolled-flat could then split in half and rise to have a giant air bubble in the middle, I looked it up on Google. And apparently the heat cooks the outside of the pita bread, sealing it, while still having moist dough in the middle. The moisture then heats up and expands, and this happens. Who knew?