Every time that Lord Vishnu took birth on earth, the establishment of Dharma has been the cause. Teaching the Kauravas a lesson and killing Kamsa, his maternal uncle, were two of Krishna's prime goals on earth. To achieve this, he had put at stake a lot of his important relations. Keeping his emotions aside and playing clever was not his choice, but the demand of the situation. Probably that is one of the lessons Krishna wants to give us through the epic.
"Playing safe and smart
despite a heavy heart,
he set an example"
There is a story where Krishna killed Jarasandh after enduring 17 attacks from him. While he was powerful enough to kill him much before, he deliberately waited for so long. Here arises a question as to why he waited for so long.
Jarasandh was the father in law of Kamsa, who was the maternal uncle of Lord Krishna through his mother Devaki. When Lord Krishna killed Kamsa, it invited the wrath of Jarasandh. He decided to kill him at any cost.
He started preparing his army, all set for the biggest aim of his life - Krishna's death. He even collaborated with other kings who were hostile towards Krishna and shared his aim with them.
While he marched towards Dwarka, the kingdom of Lord Krishna, all he achieved was disappointment. What else can we expect out of an attempt to kill Krishna? And this did not happen once, he tried this multiple times, each time with a better plan and more powerful kings. He even patched up with kings who were his own enemies in order to turn his plan a success. But all his efforts went futile.
However, his failure never weakened his belief and shook his confidence. He, thus attempted not one or two but seventeen times to kill Lord Krishna. Every time he came, Krishna would defeat and kill the army but spare him.
It was only during the seventeenth attempt that Krishna plotted his death. Jarasandh was born in two parts, each half from a different mother. Both these parts were joined by a demoness named Jara, hence Jarasandh was named after her. Jarasandh had a boon according to which he would become alive every time he was killed. The only way to kill him was by cutting his body into two halves and separating the halves away from each other, much similar to the way he was born. However, Krishna had it all planned.
There came a time when Yudhishthira wanted to perform the Rajsuya Yagya. However, for performing a Rajsuya Yagya, it was mandatory that the king should be declared an emperor and all other kings should accept him as their emperor. Knowing that Jarasandh would not accept his emperorship, Yudhishthira approached Lord Krishna for help.
Krishna then told that Bheema and Arjun should accompany him to Magadh disguised as Brahmins and challenge Jarasandh to a wrestling match. Jarasandh agreed to wrestle with Bheema. The match continued for four days and Bhima was unable to kill Jarasandh. Lord Krishna, used a leaf to demonstrate how the king should be killed. He tore the leaf into two halves and threw them in different directions. As guided, Bheema succeeded in killing him, tearing his body into two halves and throwing the two parts in different directions, not to let them meet again.
Much later, when this wicked king and a great supporter of Kamsa had been killed, Balram and Krishna were having a discussion. Balram was the elder brother of Krishna who, during the discussion, asked Lord Krishna the reason why he waited for so long. Krishna told Balram, that each time Jarasandh attacked, he came with a new army.
This army including very powerful kings consisted of the very wicked people on earth. Thus, Krishna was able to kill many demons of earth, at one place. With all others killed, Jarasandh would bring yet another group and Lord Krishna would kill them off as well. Thus, Lord Krishna used Jarasandh in order to bring an end to many wicked men on the earth, and played safe and smart again. Thus, once again Krishna's intelligence impressed his elder brother Balram.