Centuries ago, farmers would clear land for crops and toss the rocks to the side of the field. They were not necessarily saving the rocks for any purpose, but many of them eventually piled them up on the edge of their property to create low walls. They did not have the time or money to invest in mortar, so they simply stacked the rocks. This is known as a dry stack wall, and many of the original walls built this way remain today.
The farmers were not craftsmen who worked in stone, but the process they followed is the same used by stone masons across the globe. Fields with rocks are useless for planting, and many of their rocks were angular and perfect for creating boundary walls. This simple method of stacking was within their means, but it often took them years to complete them.
Stone masons have long been able to create walls as well as buildings without the use of mortar, and the pyramids are a good example. While the stones in them are dressed, they are held together only by the weight of the stones. Building without mortar can be as easy as a wall along a property line, or it can be as complex as some of the largest pyramids. Some of them use stones that are completely dressed on all six sides, and others use field rocks that are angular. Round stones are difficult to stack without mortar, so they are rarely found in dry stack walls.
It might seem easier to use mortar to keep the rocks in a wall together, but transportation was often an issue in early cultures. The farmers clearing their fields did not have the time to mix mortar, but they had the knowledge of how to stack rocks. Early masons did build walls with mortar, but it was generally nothing more than pitch, mud or local clay.