Fuel is never 100 percent clean. Grains of sand, dust and water may contaminate the fuel when refuelling.
The fuel filter has to clean the fuel from substances that damage the fuel system's components, e.g., the injection pump and injectors, and cause corrosion.