It could also be that Sweden just gives more pay to "women's work", in this way encouraging women to stay in their lane instead of going to other fields that can be more profitable and are reserved to men.

It could also be that the western stereotype of women being dumb with maths is just a western stereotype which has only effect in the West, and no such effect outside of the West.

It is also incorrect to assume that Scandinavia is a gender-equal paradise where everything is solved. They might have good parental leave for both mothers and fathers, but that doesn't mean that they don't assign specific fields to a specific gender.