Normally there are a few such students, or groups where they have e.g. 3/4 people but it's a 5-6 person group project, and they'll just automatically assign students to groups after that, but there probably will be a few "new" groups made up entirely of people who didn't group up.
Also being friends in a group project is a lot less important than doing your section of the work and everyone overall working together to get a good grade. I mean our second year management group was a disaster, in terms of social dynamics - but we did get the second highest mark in the class (they actually praised us for our "obvious teamwork" which was hilarious because it was basically two of us working and screaming at the others to do something useful).