Soil mechanics deals with sediments and other accumulation of solids in unconsolidated form produced by chemical and mechanical degradation of rocks. There may have organic constituents. The engineering problems with such materials is analyzed or solved by applying laws of the mechanics and hydraulics.
Soils consist of solids but of discrete particles which don’t have strong bond like solid but they are not free particles like fluid. So these materials falls between solid and fluid and their behavior also follow this trend.
Thus it is not unexpected that both fluid mechanics and solid mechanics contribute in soil mechanics. As soils have an inherent particulate system, such system exists in soil mass and soil mechanics is sometimes termed as particulate mechanics.