There are several reasons. None of them having to do with Biblical interpretation, all having more to do with practical matters related to culture of that day.
The first is that through the middle ages the laity hardly ever attended church. Worship was conducted by and attended by the clergy, monks, and nuns. The large cathedrals were places where the commerce of the town often took place during the week, and screens were erected to literally keep the laity away from the altar. So, it was that when they did attend there were no pews or seats of any kind for them and they just stood and milled about.
Third, in places where there were no large cathedrals, there often was not church building at all. Sometimes they met in small private chapels that were owned by a wealthy family. More often, they met instead in small groups in private homes. In either case, the pattern of society was kept. If in that society men and women rarely mingled, then they did not in church. And if it was customary for them to mingle, then they did in worship as well.
Third, after churches became common and pews were introduced, the pew also became one of the means by which congregations raised support for themselves. This was especially true in America which had no government sponsored churches, as there were throughout most of Europe. So, to raise funds they developed the pattern of an annual subscription or pew rental. Those who could afford it would annual pay for their family pew. That then became where they usually set, together as a family. (They charitably saved the best pews in the front for those too poor to be able to afford a pew of their own. Hence developed the pattern of no one sitting in the front row of many churches till this day.) And since families are composed of both men and women, mixing naturally occurred.
Finally, I am aware of nothing in the New Testament which indicates that there needs to be separation of genders during worship. In some places this was done, but we don't know that it was in all. In any event it seems that such a decision had more to do with cultural patterns than with God's design and order for the church. So, as culture changed outside the church, so did these practices within the church as well. In Christ there is neither Jew nor Greek, slave nor free, male nor free, but all are on in Christ (see Galatians 3:28), most Christian communities have understood this to apply not just to being equal in God's sight, but also meaning that there should be equal place in the life of the church itself.