By giving them a place to practice being assertive without being talked over by those who try to enforce the social norm, while also providing a place to use those learned skills to compete in mixed gender settings.
The concern has been that in a high-school social setting, many girls won't even try to compete with the boys, for a variety of reasons (getting talked over, getting criticized for being bossy, all that).
Girls in girls-only environments learn the subjects better, learn to be assertive around other girls, but still might be shocked into silence by over-assertive boys (ETA once they move beyond the school setting, that is).
Boys in boys-only environments can also learn subjects better, but can lag in social development compared to boys in mixed gender settings (like what is sometimes seen in Frat houses or military settings).
Plus, teenage hormones really can interfere with paying attention, among both boys and girls.
So you mix it - they get both environments. They get to have some same-gender classes with focus on learning subjects, but also get mixed-gender activities to focus on social development.
Scouts could be the same way.