In the Bhagavad Gita even as Lord Krishna urges Arjuna to take up arms and fight, He also instructs him on the path to liberation. The Lord states that during His incarnations not many recognise His identity. This is because they do not have the necessary level of realisation that makes them sift the real from the non-real. In a lecture, Nagai Sri Mukundan said that Uddhava, a staunch devotee of Krishna, sought clarification for many of his doubts regarding the religious and ethical rights and duties of individuals from the Lord before His departure from this world at the end of His incarnation.
Uddhava could not understand how and why the destruction of the Yadava race should happen, when the Lord is all powerful; why and how the Pandavas suffered even when they were very dear to Him; why individuals fail to tread the path of spiritual realisation and get caught in the cycle of samsara.
The Lord replied that the basic principle of not only human existence but also cosmic existence is the law of Dharma. Violation of Dharma results in disaster. The doctrine of the cycle of births and of the moral law is more powerful than even the celestials.
The Yadava race had to be destroyed because of their Karma. They had become arrogant and destructive and if Krishna departed without destroying them, the entire human race would be in danger. All these things had to come about because of a curse earned through some misdeeds. The humiliation of the Pandavas after the unfair game of dice was also a consequence of their Karma. Duryodhana sought Sakuni to play on his behalf. Had Yudhishtira likewise thought of Krishna at that time, things would have been different. None of the Pandavas called the Lord for assistance. Only Draupadi called Krishna and He sent the timely help.
The Lord implies that He is not involved in the actions of the people. He only watches as a witness. There is always the witnessing Self that takes stock of everything — thought, word and deed included — of every Jivatma. All the wrong and the good deeds are infallibly recorded and every deed meets its due retribution.