A caveat being and mentioned in the article, that sailors didn't have access to the safe water of lakes and streams, thus beer. And as someone mentions below, it's safer to drink low alcohol beer than months old (untreated) water. I can see why people jump to the conclusion that beer was safer than water...and it makes for good cocktail hour small talk.
> sailors didn't have access to the safe water of lakes and streams
As if the water of lakes and streams was necessarily safe. Imagine drinking Thames water in the era before proper sewers. In 1858 (the Great Stink) the Thames stank so badly from feces that parts of Parliament became unusable.