The main driver, in my opinion, is specialisation. We've got a much more professional workforce these days, with more specialist skills, who for this reason often have to travel for some distance to get to their places of work. That means far less time to go to the pub. Combined with modern media, it's just easier to sit indoors. People have posted other points elsewhere on this thread - they're all contributing (plus drink driving laws and smoking bans).
I mean, a lot of people used to stop working at lunchtime and spend the afternoon in the pub.
Now, if home working holds up, and then inflation abates a bit, perhaps pubs might regain an advantage, but I fear we're now in a new "steady state", and it'd take more to change things back.