The incident follows the death of Uttara's husband, Abhimanyu. Abhimanyu's widowed wife Uttara would have followed her husband, but she was pregnant and Param Bhagavata devotee Maharaj Parikshit was in her womb, so it was his ultimate dharma to protect her.
There is a huge responsibility on the mother to protect the baby in all ways, so she spoke to Lord Krishna.
Uttara was the daughter of a great king, the wife of a great valor and a disciple of a great devotee. Later she also became the mother of a superior king. She was Bhagyashalini(lucky) in all ways.
God is fair in all respects, even then he favors his devotees, because the Pandava was a total devotee, so God wanted them to rule the world.
This was the reason that by ending the rule of Duryodhana Dal, he established the rule of Maharaj Yudhishthira. So they wanted to protect Maharaja Parikshit situated in the womb. He did not want the world to deviate from the Pandava clan, which was the ideal clan of the devotees.
Ashwatthama left Brahmastra to end the Pandava clan was very deadly and wanted to destroy the last descendant of the Pandava clan who was born in the womb of Uttara.
Lord Krishna immediately took his personal weapon to protect his devotees on seeing this, because these devotees did not know anyone other than Krishna.
In the Bhagavad Gita, God has clearly stated that his devotees are never unique. They act on the basis of quantity or quality of service in devotion performed by devotees.
The Pandavas, despite being great warriors themselves, were 100 percent dependent on the protection of God.
But at this time emergency was more important than Pran(vow) . He is more well known as Bhaktavatsal, so he did not want to become a worldly idealist who never breaks his vow, but he preferred to remain a devotee.
Everyone should seek the refuge of such a supremely merciful God