I studied theoretical math (here in Poland).
When we started 1st semester, there were about 120 students of which about 30 were men (well... boys, really:)
The competition for entry was fierce, there were 17 people for every opening. In Polish education system we had point system which allowed selecting students, even having maximum points did not guarantee entry. You can be sure that every one of 120 students had equivalent of straight As on all subjects and the same for their exams, plus additional points for competitions, etc. They probably were best in their schools.
After 5 years only 20 students were left of which 15 were men.
I had distinct impression that the guys who went there went there because they loved math. We would talk to each other about math, meet to discuss interesting information, trivia, etc.
Gals, on the other hand, I had distinct impression that the went for math because they did good at previous school. They would meet with other students, but in my observation much more rarely and the talk would be exclusively about current assignment. They got max grades in everything at their previous school and they just happened to choose math as something they had good grades. They had no particular interest so they just chose one of the topics they thought they are good at. They were not interested to spend future with math, to teach math or work in research. Those girls worked harder than guys but this was just work for work sake. They had no love for math and it is pretty difficult to stick to a demanding topic like that if you are not really interested in it.
The tragedy of this is nobody told them what they had in their previous school wasn't really math and they were not interested enough to realize that memorizing formulas or "solving" problems by memorizing solutions and substituting numbers is not math.
As somebody who was doing quite well (I may have been asked by prof to do one or two lectures in their absence), I met with a lot of people who were desperately seeking help to understand the material. Guess what, almost all of them were women who were incredulous they always "did good at school" and don't understand why they are not anymore.
That's it, my subjective opinion on the matter. I was one of the guys who dropped after 3rd semester and went to work in IT.