Imagine you're 22. For the last 17 years you've showed up every day for an institution. It provided a schedule, a routine, social interaction with a community of peers who share common ground, even explicitly structured extracurricular events.
One day that just comes to a hard stop. You're sitting in your childhood bedroom on a computer. Your friends have all scattered to the wind. What now?
Of course it's possible to build a life from scratch, without the benefit of an institutional attachment. You can enforce a schedule for yourself. You can go chat up strangers in bars or meetup groups or whatever, and build a social network that way. But it's not hard to see how this level of flexibility, so suddenly, could be suffocating.
Contrast with a mid-career professional who already has a spouse, a well-developed social network gathered from the many communities he's been part of over the years, and the structure/routine of childrearing.
I did this. Started my first "proper" job in London (in an office). Used to go home at 5:30 and fiddle with my linux machine (that I was learning how to use) then go to bed.
So, I started going out to the London Linux User Group. I made friends there, and a few of us ended up going out for weekly curries/tech markets together, getting drinks, and eventually attending each others weddings (John, if you're reading this, we're all still sorry we laughed when the offical said your middle name was "Leonard").
I live in Manchester now, and have worked from home for about 12 years. I ran the local Ruby user group, and run the local Go group, and these groups have provided me with a group of great friends. Even in the relatively non-tech heavy NW England there's a tech event on most nights, and lots of non-tech groups to find.
I don't think the situation is as dire as you make out :)
I'm basically in this situation but I'm very confused about your assumption that my friends have scattered and that I need to build a life from scratch.
I have plenty of friends and family around me, from the various communities I've been apart of before my current workplace, and I'm loving being able to spend more time with them (online) during my less-packed days than when I had to commute to and from an office full of people in different stages of their lives than me, hence less likely to become actual friends of mine.
I don't see why turning 22 should hit the reset on your entire social life.
The workplace is one of the last places where you're forced to interact face-to-face with a diverse range of people multiple times, on a regular basis. If you're young, and from out of town, you get a lot from that.
Certainly, there are different clubs and groups out there, but the people they attract are fairly homogenous, and monofocused on their topic of interest. There are coffee-houses and bars, but you'd be lucky to interact with anyone there repeatedly in such a way as to form any durable social bond.
The only other quick option for gaining automatic access to a well-rounded social environment that I can think of is a church, but educated young people tend to enter the workforce with a contempt of organized religion that ranges from passive to visceral.
Churches vary greatly, but one of the largest associations of evangelical congregations in Austin was birthed from young adults, grew from young adults, and plants from young adults.
Our congregation (not part of that network) is one of the rare places where I interact deeply across generations, economic classes, and social classes from professor to auto mechanic. I couldn’t reliably predict someone’s politics. No congregation is perfect, but a common mission crosses a lot of divides.
lets say you can usually interact with 5-10 people closely everyday. Even a tech company is going to be more diverse than the average person's 10 closest friends/family members.
I am of that age and I can say I have hated the last few weeks working from home. I feel isolated and I like talking at work, I also have an easier time actually doing work at a workplace rather than sitting at home, also I just like going out grabbing a few drinks after work.
Of course the latter is more an issue of the pandemic right now than just remote work in principle but I have the sense that remote working also leads to less spontaneous interaction.
As an aside -- I prefer not to use the term "work from home", as the ideal (for me) is the ability to work from anywhere at my option.
Also, for what it's worth, co-working spaces can be a workable alternative to a traditional office.