The first part of your statement isn't true. Riders are welcome to drink as much as they like as long as they don't turn up to race under the influence. The fact that some riders are in favour of total abstinence is down to personal choice.
Ever since my first motor sport hero, Dan Gurney, started the fashion for spraying champagne at Le Mans in 1967 it's been about the show biz and not the alcohol.