You have created a simple water filter! The sand and gravel particles act as a sieve, trapping larger material from filtering down with the water as it travels downwards. Filtering such as this occurs in the natural environment as well. There are many communities who rely on underground aquifers which have accumulated over millions of years as water has filtered through the soil to the bedrock.
A classic example of an underground aquifier is Australia's Great Artesian Basin
which covers much of Queensland and South Australia with extensions into the Northern Territory and NSW.
Australia's Great Artesian Basin
You can create a simple model of soil horizons that produce these natural water filters by alternating different sands and gravel in a clear container.
Soil horizons model using sand and gravel