Safe is and was a relative term. Historically alcoholic drinks such as beer were often safer than just water in days gone by.
Also true: Water purification is still a challenge even today. Plenty of cities don't even have drinkable water in people's residences.