The comparatively lightweight arches transmit the outward pressure from the walls to the comparatively heavyweight piers on the ground. The arches lean against the walls, but they don't themselves have such mass as to collapse the walls inward, even when the walls are not pressing outward, the hypothetical absence of outward pressure being due to hypothetical absence of the vault. In vaulted cathedral architecture, buttresses allow the walls to be made less massive, but even buttressed walls are more massive than the flying arches are. The piers support against the pressure transmitted to them by the arches, but the piers don't themselves exert shear force against the walls.