Soil has holes it.
Sandy soil can have so many macropores and micropores that water and nutrients leach away. Heavy clay soil, at the opposite end of the spectrum, has more micropores, so water is held tightly. Loamy soil, in the middle, provides both micropores and macropores for the healthiest soil.
I hope this information inspires you to grow more of your own food. You can ask your garden questions on my Home page.