But wasn't alcohol used as a way to purify bad water across the medieval world?
It wasn't. I'm afraid you're starting from a very widespread Popular Myth here, which I regret to inform you is not true. I've made it my life's work to kill this myth, starting from this post; while it focuses specifically on Medieval Europe, the hydrology remains the same all over. Adding on to this, a user who no longer wishes to be tagged has a post re water sources in the MENA region.
With this in mind, your subsequent questions can be discarded - it wasn't any different in the Islamic world, and the nominal forbiddance on alcohol didn't affect much of anything, let alone drinking culture in the Muslim countries. What Islam says and what Muslims do are two related, but ultimately different, things. Let's put it like this: how many Christians are liars, adulterers, thieves, or do not love their neighbours as they love themselves? There is most definitely a Muslim drinking culture, as you will see from the following posts: