I haven't stayed in touch with any of my university friends. We all moved in to different parts of the country and, as pre social media, staying in touch was much more difficult.
Dh is still good friends with one of his flat mates - he didn't do halls and had a flat. They met in the first year. Infact, dh and I were together then and friend and his gf were together - we've stayed together and are good friends as a group, see each other 3 or 4 times a year despite living opposite end of the country. Dd is friendly with their children, etc.
We are in touch with some school friends, mainly on social media after first re-meeting one another via Friends Reunited many years back, and now in FB, etc. But we only regularly meet up with one of the friends - dh knew him from primary school, I meet him (and dh) at sixth form. We go out with him and his wife fairly regularly as live locally.
Most of my closest friends were met after I had dd, mainly through school when they first started and just before.
One of my most closest friends I met in here! That was back in the day when MN was small and we had meet ups. Met a few friends that way, some I've stayed in touch with still years on.
And, one - Became very good friends and our two families are close friends and have been for almost 20 years now, all friends with one another as a group and individually, including the children who are now young adults.
Other friends dh and I have made have been through work.
Dh]d has just finished university and is still friends with those she went to school with and some she's been at university with - social media makes a big difference. Covid had a big impact on friendships initially though.
I think they also make friends in different ways now - dd has just gone abroad to work for the summer. When applying she knew no one else going. Social media meant though that she got to know others online, and then met some a couple of times before. Leading to feeling happy to travel with a small group, live together for the summer, work together - and just become friends.
So I don't think that halls living is particularly necessary, especially these days.