In addition to boiling water for the mash process and the natural contra-bacterial qualities of hops, the yeast itself contributes something to the sanitary nature of beer.
If the beverage contains viable yeast cells these will ensure that anaerobiosis is maintained and so inhibit the growth of aerobic contaminants. Further antiseptic qualities are introduced by many of the supplementary flavouring agents, for example, hops… In historical times, therefore, beer was a useful source of dietary calories, minerals and vitamins but could also be viewed as sanitised water. In medieval times this property was of no small significance when one considers the number of potentially fatal diseases which could be contracted after imbibing polluted water. This is illustrated by the story of Saint Arnold, the patron saint of Belgian brewers, who reportedly saved the inhabitants of a village gripped by a cholera epidemic, by blessing the local brewery and advising them to eschew water and from then on drink only beer.
 Boulton, pp. 6-7
Boulton, Chris and David Quain (2001). Brewing Yeast and Fermentation. Oxford: Blackwell Science Ltd.