Hanging out with a bunch of people who share similar interests with you for 3 - 4 yrs and living with them, fashions these strong bonds of friendship which are not made after this period.
Before we get rid of colleges we need to find an alternative to this.
I went to college and lived there. I was far enough away from home that I could not return home with any frequency. I was a nerd at a college full of nerds and other like-minded people. I intentionally put more effort into making friends by participating in various clubs, social groups, and activities. I put more effort into that than I did into my studies. I did just enough schoolwork to graduate. Indeed, I did form lifelong friends during this time.
Now compare that to the story of another person I know. They went to community college while still living at home. After a year or two of that, they did leave home to go to college. However, they were at a state school with people studying various things and having various interests. There was not a group of like-minded people there. Lots of the students there were commuters and not living in dorms. This person focused on their studies, not on socializing. This person's social group today is largely still comprised of their friends from high school.
This scenario that OP describes happened for me, and presumably for OP as well. It doesn't happen for all, or even most, people attending college. It only happens for the right people who attend the right college in exactly the right circumstances.