Upper/middle class women were always expected to be educated. They would hire governesses for them that would teach them Maths, French, Latin, literature.That's true. Even in ancient times where women weren't allowed to go to school, Men who at least had the money would hire tutors and educated their daughters at home while they sent their sons to academies. Because they knew the importance of education.
A lot of it was mostly because of the fact that despite being sexist, they knew that an educated man was most likely going to be bored with an intellectually incurious and uneducated woman and such a marriage would most likely be a difficult one. During those time period, university was mostly only for the elites, so even working class men wouldn’t have attended university and the average upper/middle class woman was more educated than men who were of a lesser socioeconomic background. However, all of this was for marriage purposes and catering to what men wanted.
Kinda goes to show that even in times of rife sexism, educated men still wanted a woman with a higher IQ who could have an array of different interests and conversations and now we have some men downplaying women’s education which really goes to how that the ones who do that tend to be incredibly insecure and unsurprisingly, low achieving men who probably struggled and dropped out.