Simply put, it's statistically proven there are more men in certain fields, and more women in others.
Men are usually stronger than women, because of a little something called biology. That's why there'll be more men in the army, in the police, or in anything requiring difficult manual labor (i.e. construction workers). Men also tend to be more logical-minded due to how their brains function, although that is not an indicator that they're more intelligent than women - simply, they'll tend to go in fields that are logic-driven, such as mathematics, STEM, etc. Women's minds are more developed in the fields of empathy and emotional intelligence, hence why they tend to go in fields that involve contact with people (medical care, psychology, etc.) or expression (art, literature, linguistics, etc.). Now, fields of study aren't necesarily "gendered", and they shouldn't be either. We had great women scientists just like we had great men artists. Where the problem starts is when a certain field is restricted to a certain sex.
When it comes to sex restrictions, history is a lot more complex than what we are led to believe. A lot of people wring their hands about how Queen consorts' only job was to give heirs, and while it's not necesarily something I'd personally envy for myself, keep in mind they lived in a completely different dynamic than our post-Enlightenment world and their position was vital. Yes, women in the high classes didn't work and some of them truly suffered from being inactive, but it was less about oppression and more about their privilege - they were rich, and therefore, they didn't need to work like a maid. Women in lower classes were, until the 20th century, absolutely allowed to work, and it also wasn't rare to see in cities women who led their own businesses (you can think of the women of the Halles in Paris, who had the historical right to be seated in front of the Queen of France). And there's also the important factor that pre-industrialism, domestic duties were a lot more vital and pressing, and also required a lot more time. Why were women responsible of domestic duties? Again, because said duties often involved kids, and women were in charge of the kids because again, biology, and empathy being a stronger suit (although, again, it wasn't the case with every woman ever).
The reason why women were however barred from certain jobs or certain basic rights (such as the right to vote) had to do notably with the morality of the time. There weren't a lot of women painters because it was considered indecent for a woman to join in classes where the students would study nudes. There's also no denying that for a very long time, women were thought of as less intelligent than men - something that was proved false as early as the 16th century, when Sir Thomas More himself noticed that his daughter Margaret was far more intelligent than her brother, which led him to give his three daughters the same education he gave his son.
Did the patriarchy exist? Sure, but it's something that would come naturally in difficult times, where men who were physically stronger would be driven to protect the women and the children. Except those survival instincts didn't just go away afterwards, until a certain balance came back (one instance I can think of is the classic Middle Ages, which spanned from Eleanor of Aquitaine's time to the beginning of the Hundred Years War, where society was fairly egalitarian). It's not something that's necesarily conscious on men's part, since in most cases, they genuinely believe they're doing the right thing. As for the "nuclear" family, where the father is the head and the mother the heart... it was common simply because it was a system that worked for a lot of people, but I'll be the first person to acknowledge it won't necesarily work for everyone, simply because we all come with different personalities. Nowadays, however, where women have access to everything... I wouldn't say the patriarchy is still a thing (sexism is another thing entirely to me and all I'm going to say about that is that assholes will always exist, so grow a tougher skin already), and people who spend the time complaining about it should fill the gap they think exists instead of sitting on their asses and waiting for it to happen.