Watching a history of prohibition. Started in 1850s, at least half a century before safe drinking water was freely available such as through tap water.
Beer was much safer than drinking water until a good way into the 20th century. Initial temperance movement was against hard liquor but quickly was about abstinence.
Source: page 451 and page 828 of the 3rd edition (1972) of University Economics by Armen Alchian and William Allen; the first part of the quotation is Question #30 at the end of Chapter 22. via Bonus Quotation of the Day… – Cafe Hayek