Hi nice question.......
Well Boys don't do better than girls in math and science everywhere.
But I suppose that mostly on average guys would be drawn closer to these areas.
Personally as male I believe that math and many of the science subjects have a more macho feel to them, i.e they're more rigid, technical, robust, experimental almost like an academical battle ground to sprout adrenaline,and that can fell better for a guy than the softer feel of history, literature, or homec.
However scientifically though I'm told that boys have 6 times more grey matter in their brain than girls. Meaning that they have more spatial ability i.e. We on average should be able to do or have a liking for areas with more complex applications. Like math and science.
However asides from all of that if you purposely train a girl to like and be good at math she can undo the genetical barricades. As well as if you train up a man to like hair dressing he can become the best thing ever.