People work better without distractions. If you mix people of the opposite sex then one thing will always happen no matter what, relationships will form. Relationships are a good thing but at school, they are extremely distracting people often come in late because they chose to spend passing period with their partner, ditch classes, and sometimes even ditch school itself for a day with them. Not to mention if they are in the same classroom they will constantly be focusing on one another. So if this was eliminated people would be able to focus more on their schoolwork and won't have a huge distraction during school, this would leave relationships for off campus.
Hope this helped. Have a great day!