Why is there a de-facto separation of genders at school?

At the cafeteria tables, in group projects, at recess, etc. every friend group is all one gender. Is there a reason why there isn't more mixing? Surely there must be some girls who get along with boys and the other way around right?

Why is there a de-facto separation of genders at school?
Post Opinion