According to The Atlantic, it's because of horses.
Whence came pants? I'm wearing pants right now. There's a better than 50 percent chance that you, too, are wearing pants. And neither of us have probably asked ourselves a simple question: Why?
It turns out the answer is inexplicably bound up with the Roman Empire, the unification of China, gender studies, and the rather uncomfortable positioning of man atop horse, at least according to University of Connecticut evolutionary biologist Peter Turchin.
. . .
The reasons why pants are advantageous when mounted atop a horse should be obvious, nonetheless, many cultures struggled to adapt, even when their very existences were threatened by superior, trouser-clad horseback riders.
. . .
What all these examples suggest is that technological systems -- cavalry, bicycling -- sometimes require massive alterations in a society's culture before they can truly become functional. And once it's locked in, the cultural solution (pants) to an era's big problem can be more durable than the activity (horse-mounted combat) that prompted it.
There's more at the link.
I don't know why, but I'd never stopped to ask myself why we wear trousers. The answer makes perfect sense when you think about it . . . but I still wonder why I never asked the question! So, now that we don't ride horses (much), why do we still wear trousers? Why aren't, say, kilts making a comeback? Oh, but wait . . .