This well-made video from Practical Engineering explains why soil is not a good building material, and then shows how to mechanically stabilize it so it can bear weight.
Dirt is probably the cheapest and simplest construction material out there, but it's not very strong compared to other choices. Luckily geotechnical engineers have developed a way to strengthen earthen materials with almost no additional effort – Mechanically Stabilized Earth (aka MSE or Reinforced Soil). If you look closely, you'll see MSE walls are everywhere. Thanks for watching, and let me know what you think!