I'm going to disagree here. I have plently of friends who I met through work. Some including former direct reports.
The same goes for many people I know. I don't keep in contact with everyone I worked with - but there are a key few who I'm happy to hang out with.
I've shifted cities, but when I return these are people I go out of my way to meet with.
But regardless of whether you keep them even with an active non work social life I want also want a work social life. I have your solution but that still doesn't remove my desire to have work friends too. I spend 40ish hours a week on work. I don't want that to be with people that I can't call several of them good friends.
The exact same holds for other situational friendships. Stop drinking, stop going to church, get injured and stop playing sport, and see how long those friendships last. That doesn't make them any less real.
The connections you have with work friends from previous jobs persist; you can catch up about old faces, industry and workplace goings on, and career progression among people who understand the situation intimately.
Work actually makes it -harder- to really connect with people. The norm is to keep personal stuff personal; you don't bring up the difficulties you're having with your SO, and they don't give you advice or commiserate.
But...work friends aren't friends. It's very rare to stay in touch if you change jobs. In fact, that normalized relationship is a tie keeping you at a job that may otherwise be bad.
As a reason for why to be in the office, I feel like it's a coping mechanism, rather than real fulfillment of the need. I can't say "better to rip the bandaid off" or similar, but I can say that the 'right' solution is to find connection outside of work. Even if you're in the office, you have to do that for the friendship to persist should you ever leave.