In the Kurukshetra war, the Pandava side represented Dharma, and the Kaurava side adharma.Then, why numerous warriors in the Pandavas' side also died in the battle?
Mahabharat was not a war of Dharma and Adharma.
I pray to thee, O bull of the Kshatriya race, let not the Kshatriyas, old in learning and old in years, perish miserably, O Janardana, for thy sake. Oh, let this swelling host of Kshatriyas perish by means of weapons on that most sacred of all spots in the three worlds, viz.
Read this for more information.