The simplest answer to why we wear pants is this: horses. At least, according to Alexis Madrigal, there is a strong correlation between pants and riding horses that goes as far back as the Roman Empire and was prompted for the need of successful horse-mounted combat, a legacy we still live with today.
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.
Turchin details how the Romans eventually adopted braccae (known to you now as breeches) and documents the troubles a 3rd-century BC Chinese statesman, King Wuling, had getting his warriors to switch to pants from the traditional robes. "It is not that I have any doubt concerning the dress of the Hu," Wuling told an advisor. "I am afraid that everybody will laugh at me." Eventually, a different state, the Qin, conquered and unified China. They just so happened to be closest to the mounted barbarians and thus were early to the whole cavalry-and-pants thing.