Yadaa yadaa hi dharmasya glaanir bhavati Bhaarata Abhyutthaanam adharmasya tadaatmaanam srijami aham
(chap. 4, verse 7)
Whenever and wherever there is a decline in the practice of dharma (righteousness) and rise of adharma (unrighteousness), O descendant of Bharata, then I manifest Myself.
God created this Universe on His own initiative and ordained various codes for its upkeep and smooth running. There are rules of right conduct for every being. These form Dharma. Every single person in the world has his own special Dharma or uniqueness of duty.
When people break loose from Dharma and do not follow the right path, then they are doing Adharma. It is like weeds overpowering the crop. The weeds need to be removed to allow the crop to flourish.
Whenever the practice of law declines and the purpose of life is forgotten and unrighteousness rules the world. God manifests Himself on earth to correct the wrong.
Lord Krishna says that whenever there is a need to uplift the world, He manifests, assuming a Name and a Form. He took the form of Narasimha (half man, half lion) to destroy Hiranyakashipu who had received a boon that he could not be killed by man or by animal. He came as Lord Rama to destroy the evil Ravana and as Lord Krishna to destroy the wicked and evil king Kamsa and the Kauravas.
Humans are born as a result of the merits and demerits of previous births. Theirs is a Karma Janma (birth). God’s is a Leela Janma. He comes of His own Will. Prayers of the good are the cause of God’s Janma. The misdeeds of the wicked are also the cause.