There's a bit of a discussion in the comments here.
That armies suffered from and could be wiped out by disease outbreaks was well-known in ancient times. And if you think that the design of Roman camps' sanitation was not caused by the desire to avoid sickness, how do you think it arose?
But I agree that empirical advice of the "Don't do X or bad things will happen" kind could come purely from repeated experience without any idea of why this is so.
I can think of lots of alternate hypotheses for why Romans had good camp hygiene.
(1) Russo's answer to everything is that they copied all their technology from the Hellenistic Greeks without copying their understanding (eg, aqueducts). History or archaeology probably records who had these camps first. (2) Perhaps urban disease evolved cities to have good hygiene without understanding and the Romans copied the hygiene to the camps fairly arbitrarily. (3) Or maybe it copied some other urban practice that had non-disease reasons. Or pure superstition. This isn't a detailed hypothesis, but I don't think that's a good reason to reject it.
Related: Son of Low Hanging Fruit, Low Hanging Poop
A post by Gregory Cochran's and Henry Harpending's blog West Hunter.