I always wondered that why Krishna left the city of Mathura and settled in Dwarka. I could never understand what powers Jarasandha had to finish everything and Krishna had to run away and he was named Ranchod.
There lived a cruel asura king named Kalayavana, who disliked Yadavs. He prayed to Lord Shiva for 12 years and earned the boon that no Yadavs would be able to slay him.
When Jarasandha, the king of Magadh kingdom, learnt of Kalayavana’s boon, he was elated. This was the opportunity he had been waiting for. His two daughters were widows of king Kansa. His daughters were constantly encouraging Jarasandha to take revenge for their husband’s death.
Jarsandha joined forces with Kalayavana and declared him the commander of the unified army. He instructed him to invade Mathura and kill Krishna and other Yadavs.
When Krishna learnt of the plan through his spies, he knew that he might not be able to protect his people with his current army. So he convinced his people to move to Dwarka. He called Vishwakarma, the architect of the heavens, and asked him to build such a city for his people that would protect them from all sides. Thus the city of Dwarka was built and Krishna was called Ranchod. (who left the battlefield).