There is an old children's song about a wise man who builds his house upon a rock. According to this song, a house built on a rock stands, even through the rain. By contrast, soil built on a bedrock of clay will swell from retaining water in rain and cause a home's foundation to shift and crack. In construction, technology allows builders to correct problems caused by clay soil. But it is far less expensive to build on soil that is already good for supporting buildings.
Sandy soil has a gritty texture because it is formed from small particles of weathered rock. It is a good soil for building structures because it allows water to drain away from a building site but will not shift or move. Sand may be compacted to add additional stability to the soil. Because sand particles have irregular shapes, the fragments will catch against one another and lock into place, providing additional stability. Builders will often add sand to the soil of a foundation and compact it in order to create a more stable soil for building on.
Bedrock, or a solid underlying layer of rock beneath shallow topsoil, is an ideal foundation for a home because it is impermeable to water runoff and will not change shape and size in the presence of water. Bedrock does not slide, shift or move. Homes constructed over strong bedrock do not have cracks in them from settling the way that homes built over expansive clays may.
Chalky soil is a type of clay soil that is formed from extremely fine particles of alkaline rocks such as limestone. Unlike most clay, chalky soil is ideal for building because the soil will not retain moisture and will not swell and shrink seasonally due to the presence or absence of water.
Loamy soils are an intermediate soil halfway between sand and clay. This soil typically has a mix of organic material, sand and clay. Loamy soils are considered by builders to be adequate for building on, which means that they are better than clay but worse than sand. Loamy soils that have large undecomposed vegetation in them may shift as the vegetation decomposes, but will not shift due to the presence or absence of water. To guard against building on loamy soil that has undecomposed vegetation over it, builders can look at topographic maps of the area to see how land has changed and whether a previous landowner has buried vegetation such as trees or shrubs as a way of disposing of them.