I think so too. It helps to form good habits. If you have a roommate for example, you can't leave your dirty dishes everywhere and need to clean it as soon as you are done. You can learn a lot from your roommates too. One of my ex flatmates was super crafty and I got a different perspective on things thanks to that.

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.

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.

The complaint from people who do live with shitty roommates is precisely that they DONT do that thing you claim people "have to do".