IIRC, a lot of it was credited to the difficulty of getting pure drinking water. Fermented beer (with considerably lower ABV than we're used to) was much safer to drink than water from a river that everyone upstream had been throwing their trash into.