i.e. people knew to avoid bad water sources. People would get sick, and word would spread I assume. Or perhaps people have an instinct for water quality in some way.
In any case, we avoided bad water because it was bound to make us sick, at some point earlier than our understanding of bacteria, etc. we understood that.
So what did we think was in the water to cause illness? Just magic? The devil? Gods?
It's impossible to generalize all pre-germ theory views of illness and contagion for all cultures. Suffice to say there were many. It is also worth emphasizing that even for very well-documented cases of waterborne illnesses, like cholera, there were plenty of people, even those what we would call essentially "modern physicians" (professionals who went to medical school, had a naturalistic and "scientific" outlook by any modern standard, etc.), who explicitly rejected the idea that it was waterborne in nature. With cholera, it essentially took an entire generation after John Snow's much-celebrated demonstration of its waterborne nature for American physicians and public health advocates to accept that it was the case — they preferred their previous attribution of the disease, which was largely about poverty, bad morals, and bad smells (miasma). Attributing causes to illness has always been very difficult, and it interacts in complex ways with the underlying culture (in the case of 19th century America, extreme classism and moralizing colored thinking about cholera — in the case of the 20th century, homophobia and moralizing colored discussions about HIV, as an example of something more close to home). In another framework, e.g., Galenic medicine, they would have a totally different conception of illness that had nothing to do with something spreading (a contagion) one way or another.
It's a mistake to think that all pre-germ theory ideas were about magic, the devil, Gods, etc. There have been naturalistic theories of health and disease in virtually every culture for thousands of years. They look very alien to us today (e.g., humor theory, miasma theory). What we could consider "magical" explanations (non-naturalistic) did exist, but it is a dangerous temptation for a "modern" person to assume that all "pre-modern" explanations were of this sort (and I will refrain from commenting on how "modern" we are today, given the amount of floor space that plainly pseudoscientific products take up in a modern pharmacy). There is a separate anthropological level of discussions about "purity" and "contamination" (which is apparently cross-cultural) that were often (and still are) quite disconnected from any specific medical framework.
(On cholera, see Charles Rosenberg, The Cholera Years. On "purity" as a cultural theme, Mary Douglas' Purity and Danger is the reference text.)