When a civilization is facing a great crisis, two types of personalities have to take initiative—the warriors (the politicians or men of action), who are capable of winning the support of their population and subduing the enemies of their civilization, and the great philosophers (the men of supreme wisdom and knowledge of religious and philosophical texts), who advise the warriors on morality, righteousness, justice, and political strategy.
In the Mahabharata, the first type of personality is represented by Arjuna and the second type by Krishna. They come together to save their civilization from a great crisis. Before the great war begins, we find that Arjuna is always eager for battle; again and again, he argues for a swift military action against his political rivals, but he is always held back by Krishna who insists that a war will be too destructive for their civilization and that they must negotiate and find a peaceful solution. But once the war starts, and the two armies are standing opposite each other, Arjuna wants to abandon the battlefield because he does not want to commit the sin of mass slaughter, but now Krishna insists that the war must be fought.
Krishna delivers the teachings of the Gita to Arjuna to make him realize that it is his duty to fight the “dharmayuddha” (the holy war for justice and moral principles) and walking out of the battlefield would be a grave sin which will lead to the annihilation of their civilization.