What forms the pocket in Arabic/Pita bread?
The crucial ingredient is water - which turns into steam in a very hot oven.

Let me explain based on a standard pita bread process. A comparatively simple dough (flour, water, salt, yeast) is kneaded, shaped into balls and left to rise. Before baking, the balls are rolled out in thin circles or ovals and baked on a hot surface, either a baking stone in an oven or even near an open fire.

The pocket is physics: the high heat causes the outside of the dough to become firm almost immediately, while the water in the dough turns into steam. The steam needs a lot more room than water, but the vapor is contained by the outer surface. The only way the expansion can happen is by swelling up like a balloon - and the upper and lower dough portions are separated, forming the pocket. Of course the pita isn’t fully airtight, so it will deflate again after baking as it cools, but the pocket remains.

For other flatbreads or flattish breads, baking temperature is significantly lower, so that the bread gets an overall texture of holes. An example is focaccia, where a good baker will be super careful to preserve the larger bubbles created by the yeast in a comparatively soft dough. Large bubbles in pita are purposely destroyed by rolling them out immediately before baking. If you look really closely, you will probably see that some pitas have more than one major cavity, often ripped up at a later stage. And of course there are lots of ways how a baker can influence the texture (large holes, uniform small holes, one pocket) by the raising, shaping and baking techniques they choose.