I used to live in a flat with one flatmate who changed every half a year or so because they were usually interns. Never knew them before they moved in but 90% of the time we became friends. I liked that they changed after a while so I was never stuck with a bad roomate.
I don't recommend the other way around. If you have a good friend it's more likely to notice their annoying habits so there is little upside but in a worse case you can damage the friendship.
if your friendship can't survive that, it wasn't a good friendship to begin with.
People don't need to be forced by the environment. They can strike healthy balances on their own.
You can have a social life without having roommates and you'll likely end up living with your romantic partner after spending some time dating them or multiple people until you find the one you move with.
Living alone will definitely help with the privacy and ease of bringing people you're dating to your place for private time.
Basically: a team of researchers asked people if they'd be happier on their morning commute if they interacted with strangers or kept to themselves. Most said they'd be happier keeping to themselves. Then the researchers ran an experiment where a group were told to keep to themselves, a group was told to interact with a stranger for as long as possible, and a control group was supposed to do whatever came up. Those who were forced to interact with a stranger came away most happy, and those that kept to themselves were least happy.
We are social beings - it is how we have been able to survive as a species. And yet, given the choice, we often choose to isolate. I think people would be happier and healthier if we made more of an effort to combat that tendency.
I see a lot of comments here along the lines of "I prefer to live alone because roommates are a pain in the ass", but I think there might be a lot of value to doing this because it's good for you. Living with other people forces us to corral our worst tendencies, to break out of virtual worlds to engage in the real one, to form bonds that will force us to grow and change.
I think it's strange that our preference in this area, but not many others, could be so dominant over what is good for us.