Schools used to divide children more - even state infants had boys and girls entrances and divided them up in play right back to the 1900s I think.
These days many of us pay for education which is single sex because girls do better when not in mixed schools - particularly science, maths. Boys do in some schools too and eg easier to get a boy to sing in choirs if it is not seen as a "girls' thing" as there are no girls in the school going it, lessons can be directed at the boy rather than boys being a naughty aberration, everyone is a boy instead in those schools.
Most of the top schools for A level results and Oxbridge entrance are single sex - Eton, north London Collegiate etc etc etc etc
Quite nice not to have children in schools where flirting, make up, how you look is part of life. If there is no one of the opposite sex around then children tend to concentrate on work better and get better exam results and do better in life.
Plenty choose them for religious and cultural reasons too - Muslims not wanting the sexes to mix and plenty of other religions too.