Not nobody, not even the Great Dictator himself, has suggested banning workmates from socialising. Part of the reason for commenting on it is because people ask why women don't get promoted as often. Well, this is one of the reasons. It's simple acknowledgement.
However, while bans on socialising would be counterproductive, it would be beneficial for everybody if socialising organised by the employers were reduced. In some workplaces Friday night drinks are practically obligatory - for example, if you don't go you won't even hear about a new project coming up that would help you in future promotions. Anyone claiming this sort of thing doesn't happen is either lying or very stupid.