Going to the gym is also not cheap, and, even so, we're not all late 20s - early 30s people, us people in our 40s or in our 50s also need a nice place to hang out without getting physically exhausted in the process.
As for the hobbies, most of the "community" ones also require relatively more money to be spent, and, again, it pertains to a certain demographic.
Also my local gym is very popular with the 50+ crowd. There seems to be a large social aspect to it for them. Don’t knock it!
I can say that around here in downtown-ish Bucharest the annual subscription for a popular gym varies between 500 to 800 euros per yer, depending on the chosen plan/options, but you really do want to get the more expensive plans/options that are between 700-800 euros. That is if you pay all in advance, if you pay month by month or 3-months by 3-months (it's all so complicated) the costs are between 80 to 100 euros per month.
I agree though that all this may vary. As a man you may choose to "cheapen out" a little and choose less expensive gyms that are located further out or who attract a different kind of clientele, but that option may not be available for many women (as my partner is), unfortunately.
Or rather history? It's been Church or the Pub for a very very long time.
The other part of this is that a third places mixes people of different social strata, and you end up talking to them, getting a cross pollination of ideas.
A self selecting hobby group is not necessarily this.
A hackerspace may be more like this, or a community garden, but a competitive chess club? Probably no.
A gym? Cost, physical exertion immediately excludes a lot of society from participating.
"it's not fitness, it's life"
Even if it wasn't, most people are wearing headphones. Sustained conversation would be difficult.
For example, the alcohol, as brought into spotlight by 'Animats. It's rather well-known (if a little tough to admit for many people) that alcohol is the "social lubricant". The way it lowers inhibitions and "screens off" pent-up stress, helps people make connections, build and nurture friendships.
It's not the only way to do this, but it's a way that works, and scales well among and across social strata - a fact that's been recognized since time immemorial, and the millennia of culture built around drinking only reinforce its bonding effects.
Serious iron gyms are usually a lot more chatty than commercial / for everyone gyms.
None of them are like the pub though, the pub has no activity other than socialising, it's the entire point.
"going down to the local" means visiting one's nearest pub.
As for non-alcohol-based options, they could have used a picture of a coffee shop. But even then, coffee shops today are more like an assembly line for Ubereats orders.
No mention of gyms, or sports, or hobbies. All three photos show boozing.