Because the skant looked silly. Even in the 21st century, both males and females can wear pants, slacks, jeans, or any other type of lower body garment with two separate legs.
Pants are the unisex garments of the present and future.
The only reason you think pants are less silly-looking is because you're more used to them. That's the kind of ethnocentric bias that the Federation is supposed to have grown beyond. There have been many human cultures in which men and women both wore draped or skirtlike garments -- kilts, saris, togas, kimonos, etc. -- rather than pants/trousers. Trousers were invented by horse-nomad cultures as a more practical type of wear for riding horses. Presumably they caught on among nobles in the West because horseback riding was common among that class as well. But for people who don't habitually ride horses, there's no particular reason to prefer them beyond fashion, and that's arbitrary.
Besides, as I've said many times before, it's illogical to expect the fashions of another century not
to look silly and bizarre by our standards. We're chronologically closer to the era of powdered wigs and bustles than we are to the era of TNG, and yet TNG-era fashions seem hardly any different from our own. I've always found that a failure of imagination.