This is a common confusion with the ancients' lack of germ theory. It doesn't mean they weren't aware of the association between filth, excrement, and the concept of contamination or unhealthy influence. Miasma theory goes back to at least Hippocrates, and it was thought that bad smells could cause illness. That decay begets decay is obvious. They were just very fuzzy on the mechanism.
Actually Varro, more than 2000 years ago, describes a theory of infectious diseases that are caused by microbes that are invisible because they are too small ("bestiolae") and which is formulated very similarly to how we describe such diseases today.
Perhaps Varro has taken his theory from some lost work of a Greek philosopher, though it is not impossible that he has formulated the theory himself, because his work includes a few other original passages that look very modern, e.g. when he explains how any theory should be improved by new experimental results.
In any case, this is another example of the fact that in the Ancient World for many things there were multiple competing theories, one of which was actually the modern correct theory. However the correct theory typically remained only a minority view, because they could not prove experimentally which is the right theory, so they only debated which is the more plausible of them and the more convincing orator was who won, even when he supported the theory which is now known to be wrong.
Besides, you don't need to specifically know that filth causes disease to find it offensive, and to be innately repulsed by the idea that your food has been near it. Hygenic behavior is, to some degree, instinctive.