A properly built dry stone wall has a good deal of give and take to it. It stays together the same way a basket does.
The stones in the wall are skillfully interlocked in tight arrangements and yet are still able to move. The connectedness of the stones create thousands of expansion joints. Each joint can move a fraction of inch if it needs to.
The unsightly cracks one sees in a concrete or masonry block wall our to frost heaving, hydrostatic pressure in the earth and erosion do not occur in a dry stone wall.
Stones laid up in dry laid configurations not only have a basket-like adaptability to stresses within their structure, dry stone walls can even be adapted to become basketball backstops too. Here's one I saw in the Lake District a few years back.