Dont forget that alcohol was also used to make water safer to drink and as a source of callories.
link to abstract
There was a time when it was far safer to drink alcoholic beverages (even if they were very watered down)than to drink the water by it's self. It is as deep in western/European culture as you can get. In fact it has shaped the our very nature in the as most Europeans and those who are descended from us have evolved to have a tolerance of alcohol that other isolated ethic groups who didn’t routinely use alcohol to purify water are missing (it is a well documented fact that may Asians lack any meaningful tolerance to alcohol and are ”drunk’ by the end of the first glass. )
It’s not illegal because alcohol is a huge part of who we are and the abuse of it is a regrettable side note to that . ( that and the taxes it generates)