According to many sources, one of the purposes of building's foundations is "To distribute the weight of the structure over large area so as to avoid over-loading of the soil beneath." (Wikipedia)
On the Wikipedia page on foundations, there is the following picture:
So the foundation seems to consist of some type of "legs", with a larger surface area on the bottom. But if the point is to distribute the weight of the building over an area, why not put the bottom of the building in contact with ground? Isn't the bottom of the building itself a much larger contact area than the area the foundation can provide? In the picture, the bottom of the building does seem to rest at ground, so why do we require the foundation to have these large surface area rectangles at the bottom if the whole weight of the building is already resting on ground?
Here is another picture from the same page:
This seems to be some sort of lodge or a cabin, with stones used as foundation. Here it is evident that the building itself is raised above ground with the stones used as a contact to ground. But now the small stones suffer all the weight of the structure. Wouldn't they be under quite a heavy load over small contact area and possibly sink into the ground? Why not simply have the building's floor, a much larger contact area, rest on the ground?