Yep, I agree about other posters who've mentioned the "pressure" to attend. I was happy enough to attend work socialising events that I actually wanted to and thought I'd enjoy, i.e. pub quizzes, etc., but the pressure and then shaming when I didn't go along to their cricket or snooker sessions was completely out of order and I told them so (and their bosses) when I left!
However, I also see the other side of things when you have staff who simply won't ever go to anything, and it does kind of spoil working relationships/friendships.
So, two sides of the coin really.
I was discussing this exact thing with our son yesterday. He's 10 months into his first "proper" job after graduation and working in a huge firm. About 15-20 graduates started at the same time. The firm set up internet group chats so they could start "chatting" in the months leading up to the start date, they also set up a couple of voluntary "get to know each other" days last Summer, with a free lunchtime buffet, tours of the offices, etc. Son threw himself into it all, despite having previously been very shy and socially anxious (not helped by being stuck at Uni during covid lockdowns), but he knew he had to throw himself in. Few others bothered. Only two of them turned up at the "get to know you days", only 3 or 4 of them engaged with the online chat. He got to know a couple of the others quite well over the internet and when they started work, and between them, they came up with all kinds of ideas for socialising with the other grads, i.e. asking if anyone was up for a river boat ride (river right outside the office!), or going to the museum, or going for an evening "ghost walk" of the town, or even getting together for lunch in the park across the bridge. Absolutely zilch response! After the first month or two, they stopped asking and making suggestions and just do things themselves now, along with some interns (work placement uni students) who likewise threw themselves into socialising! None of things they'd been suggesting involved getting drunk, going to pubs, doing sports, etc., that fair enough, some wouldn't have been interested in, they were all pretty simple/generic/cheap activities. What he's really annoyed about now is that he's starting to come across some of them working in other departments/other floors, etc., and they're moaning that there's no social activities happening and they're a bit disenfranchised with the firm, especially as they're encourage to WFH for 2 days a week! He's had to remind a few of them that attempts were made but there was little or no interest from them!!
It does work both ways. You get out what you put in. I think that pressure is completely wrong, but it's also just as wrong to shun perfectly simple/cheap/generic activities all the time, especially if you then bemoan that work colleagues don't talk or you feel left out! Best to get on in there and help shape what activities are taking place by offering suggestions, etc., rather than simply opting out and then whinging about other colleagues being "more in the know" or nepotism etc.