About three thousand years ago, men who were going into the field to work, or going to battle would “gird up their loins” by taking the hems of their robes, and tying them up around their legs like pants.
This continued for quite a while, then the styles started to change. Robes became dresses over time, and pants became the norm for those that went out to work and fight. Being that peasant women stayed on the homestead for a majority of their lifetimes, there was no need for pants.
Also, in the past pants were more expensive than dresses, because sewing wise, dresses are extremely simple (not modern ones), while pants are more complex. So you used pants only if needed and usually they were useful for the manly works, while all the women stuff was easily doable also with dresses, so there wasn’t need for expensive, more complex and so more prone to breaking pants.
From that, it stemmed the conception that dresses aren’t manly, so the style evolved with that.