There are far more advanced pastry people here than I, but I’ll take a stab at this. When you first mix the dough, and you sometimes knead it, etc., it’s all sort of forced into submission. When you give it time to relax, it, literally, relaxes. Its moisture gets to distribute evenly and its elasticity develops. This lets you shape/roll it without tearing it, and it lets it rise (if necessary) evenly.