What happened after the Kurukshetra war

Why was Lord Krishna on the side of the Pandavas in the Kurukshetra battle?

And when Krishna was asleep, Duryodhana entered the room and sat on a nice seat at the head of the bed. And after entering this bearer of the diadem, the magnanimous Arjuna. And stood in the back of the bed, bowed and closed his hands. And when the descendant of Vrishni, Krishna, woke up, he first looked at Arjuna. And after asking them about the safety of their journey and giving them the correct greetings, the Madhu hunter asked them about the reason for their visit.

Then Duryodhana turned to Krishna with a cheerful expression and said: It is up to you to help me in the coming war. Arjuna and I are both equally your friends. And, oh descendant of Madhu, you also have the same relationship with both of us. And today, oh hunter of Madhu, I was the first to come to you. The righteous take up the cause of whoever comes to them first. So did the ancients. And, oh Krishna, you are at the forefront of all righteous people in the world and are always respected. I ask you to obey the rules of conduct that lawful men obey.

Thereat Krishna replied: 'That you came first, O King, I have no doubt in the least.But oh king, the son of Kunti, Dhananjaya, was seen by me first.Because of your first arrival, and because I saw Arjuna first, I will no doubt render my assistance to both of them, O Suyodhana.But it is said that those who are younger in years should be the first choice.Therefore, Dhananjaya, Kunti's son, is entitled to first choice. There are a large number of cowherd men, ten crowns in number, who rival me in strength, known as the Narayanas, who can all fight in the middle of a battle. These soldiers, irresistible in battle, will be sent to one of you and me alone, determined not to fight in the field, and laying my arms down will go to the other. You can, oh son of Kunti, first choose which of these two is recommended to you. Because according to the law you have the right to the first choice. '

Addressed in this way by Krishna, chose Dhananjaya, the son of Kunti, Kesava, who should not fight on the battlefield and especially the gods and the Danavas.And Duryodhana chose the entire army (consisting of the Narayanas) for himself . And, oh descendant of Bharata, having received thousands upon thousands of troops, he was exceedingly pleased, even though he knew that Krishna was not on his side.