I’m not saying that should be the primary place you look for friends or an SO, but plenty of people are successful doing it.
What happened to meeting people naturally outside of a forced setting?
And I've never been "forced" to take or stay at a particular job.
You are oversimplifying the issue. Please find some insight that there's more nuance here.
People who can develop relationships in a variety of contexts don't feel alone and depressed when remote. There may be other issues; time zone problems, being left out of the loop at work etc., from companies that are not well set up for it. But those are not the issues at hand.
I'm talking about social laziness. Few people have the guts to go introduce themselves to a stranger (in an appropriate context of course) and strike a conversation and try to make a friend. At the office this is "built in" and you get a level of socialization for free. So many people rely on these perks and leave it at that. Tons of firsthand observation here.
It turns out happiness takes lot of work. Having a healthy social life takes a lot of trying, failing, and some successes that you cherish.
Some people tragically take their co-workers as their friends and the office as their social environment. That's really dangerous. You need to go out there and try, be awkward, fight to make some close friends in the real world. Office drama and venting over a beer after work is not a social life. Also the office is not a dating pool. Being depressed that your office doesn't have any cute girls or boys... oh boy, I've seen it!
Isolation and depression is due to lacking social skill and not having the drive or insight to develop that skill.
Remote work is hardly related. It's related only because people take the office as their social scene and of course when they go remote they lost their entire social scene.