For the construction of any building or even outbuilding, a calculation of the amount of material is calculated and the foundation is laying.
Since the foundation is the basis of the building, its foreshow (upper part) takes the load on itself, and the sole (lower part) distributes it to the soil.