Was the being safer than water really a primary reason for the popularity of alcohol?

by [deleted]

I often see the claim that beer was popular and an important part of early societies like Egypt because it was safer than drinking water, but I never really see anyone source their claim. Is this really the case, and can you cite a source in your answer?

As a followup question, if it is true, why didn't they just boil water? Was that not known yet?

pmoneydubs