Facts About Before The Mahahabharata had happen
Before the war, both Arjun and Duryodhan had gone to Krishna asking for help. Duryodhan had reached Krishna before Arjun and sat near his head. Arjun came after Duryodhan and sat near krishna's feet. When Krishna woke up, he saw Arjun first since he was right opposite his eye view and asked him his purpose of visit.However, since Duryodhan had come before Arjun, he got angry and complained that he came first. To this, Krishna replied that since he saw Arjun first therefore, his wish would be fulfilled first. Arjun given the chance asks Krishna to come on his side leaving Duryodhan more than happy, as he wanted the army and not unarmed Krishna.
It was a Master plan! Before the war, both Arjuna and Duryodhana had a choice between Krishna and his army. Arjuna had happily picked Krishna and Duryodhana happily picked the army, so it was not Krishna who actually gave his army to Kauravas. In fact, Krishna played this drama because he knew that Arjuna would prefer him and Duryodhana, who never considered Krishna as God, would prefer the powerful army instead. He never wanted to be at Kaurava's side. This deal also made both Arjuna and Duryodhana happy and satisfied. Each thought what the other guy got was worthless compared to what he picked!
Then, why did Krishna want to give his army to Kauravas? Why did he want to give anything to Duryodhan at all? One of Krishna's Avatar mission was to get the subcontinent rid of the powerful warriors, and restore the balance. Because at that time Kings processed too much power (army, weapons, too many powerful warriors) and that power challenged the peace of the overall society. In this mission, he wanted his powerful army too to be perished. Thus, he gave them to Kauravas. It was Arjun who killed Krishna's army, with Krishna's support as his charioteer (the Narayani Sena) Krishna's army fought along with Samsaptakas against Arjun and he was the one who exterminated all of them. If Krishna had given his Narayani Sena (of 2 Akshauhinis) to Pandava side, size of the armies of both sides would have been equal.
Kaurava Army = 11-2 = 9 Akshauhinis
Pandava Army = 7+2 = 9 Akshauhinis
If the initial sizes of the armies were equal, the winning side would have had a big remnant at the end of the war. Even having started with smaller army Pandavas’ side had some army left with them in the end. So, if they had started with equal size, Pandavas’ side would have had more than 2 Akshauhinis of army left with them at the end. Who would kill them then? This is why Krishna gave his army to the losing side.Krishna did not have to help Duryodana. According to Kshatriya rules, warriors always had the right to help their friends no matter the other side asked or not. Only a person who is not attached much to any side chooses his help to the side that approaches him first. We can also see that most of the important allies of Kauravas and Pandavas chosen their sides based on their friendships and previous enmities.
Personally, Krishna was always with Pandavas but, officially his Kingdom had equal political relationship with both Pandavas and Kauravas. Thus he decided to provide some material help to Duryodhan too.However, according to Mahabharat, one particular group of yadavas still fought from Pandavas. It included Krishna's son Pradyumn. Satyaki fought from Pandavas side mainly because Arjun was his guru.
Krishna wanted to be on Pandavas side as he considered them abiding by the dharma and a vehicle to fulfill his mission of establishing dharma. But probably due to discordant voices within his unit, or for some other reason he separated himself from the unit. Krishna did not desert/abandon his army. He protected yadavas for most of his life, although- as he professed in the Gita - with perfect detachment.Also, since Krishna was a cousin to both sides of the war he could not be partial to anyone. He neither believed the Pandavas were absolutely pure beings, nor that the Kauravas were absolute evil. This was not the way he looked at life.He constantly maintained a good relationship with the Kauravas. Duryodhana’s wife Banumathi was a devotee of his. He did not see the Kauravas as out and out evil – he just saw that they were causing much evil.
In many ways, Krishna tried to encourage Duryodhan to strive for dharma. Even at that point when he gave this choice between him and his army, he still tried to avoid the war. In a way, it was a very intelligent move to give the army to Duryodhan. That way, Duryodhan felt that Krishna was on his side, thinking the Pandavas were fools to take one person instead of a 100,000-man-strong army. This could have been something for Duryodhan to latch on to and bring peace, but it failed.Krishna wanted to be on Pandavas side as he considered them abiding by the dharma and a vehicle to fulfill his mission of establishing dharma.