The boil does kill the bacteria, but it's not preserved after the boil. At best it's as sterile as water; at worse it spoils faster due to the abundance of nutrients.
That's why it's kept sealed, under pressure. I wouldn't fill a water bottle and let it sit for many months before drinking it ever today. A beer bottle with CO2 atmosphere can sit for a long time.
There may be other reasons to prefer beer where the alcohol is relevant of course, just not for freshness. And freshness could absolutely have been relevant in the choice of drinks to load, together with low cost and acceptance in general.
Would technology that allows sealing of beer not apply even better to relatively nutrition-less water? Especially boiled water. Anything that can feed off of pottery + water or metal + water or glass + water is gonna take a lot longer to grow than basically any kind of familiar bacteria feeding off beer + any of the above.
> There may be other reasons to prefer beer where the alcohol is relevant of course
I imagine these are largely the same reasons people drink beer today. Spoiler: it generally ain't hydration or avoidance of disease.
Absolutely, I just suspect that wasn't a realistic option at the time. It is obvious a keg of beer has not gone flat but it's probably not as obvious when buying a keg of boiled water (if that even was a thing back then).
Ships carried literal tons of fresh water. I'm not sure the details of treatment or how it was provisioned—provisioning beer was such a massive logistical task we have mountains of records, but we have a paucity of corresponding records for water—but we have sufficient records of what happens when that fresh water disappears or becomes tainted to know it was of paramount importance.
Keeping water fresh is not quite as difficult as you might think. For one thing, wood has naturally antibacterial properties; it can be trivially sealed with pitch and tar (which also has antibacterial properties), and it just takes one quartermaster to babysit it.
If anything, beer is a way of preserving calories and boosting morale. The fact that drinking a gallon of it translates roughly to drinking 97% of a gallon of water and does end up being quite hydrating just doesn't imply that people didn't also drink water sans beer.
Wooden barrels were sealed and could handle high pressure. The trouble is that (long story) it was very difficult to get a precise amount of pressure, so people generally didn't even try. There are videos online of cases where people have failed and end up battling a beer barrel spraying beer like a firehose.
There may be other reasons to prefer beer where the alcohol is relevant of course, just not for freshness. And freshness could absolutely have been relevant in the choice of drinks to load, together with low cost and acceptance in general.