Montanero has it right
Filtering the crud out lets the chemicals (Chlorine, Iodine?)work better too.
Large lumps of matter can protect the pathogens from the disinfectants because they react with the chemicals or they have the pathogens inside where the chemicals can not reach.
The school demonstration likely was not a very effective filter either but your city water supply is likely using a sand filter too.
When they are properly set up they remove almost all the solids and then the city chlorinates to kill any bacteria and viruses that might get through.
Slow sand filters are even more effective.
_________________________
May set off to explore without any sense of direction or how to return.