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.
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.