Yama himself comes to claim the soul of Satyavan.
Once, Yama reached to Satyavan to get his life forever.
When Savitri's husband Satyavan died, the Lord of death,
Yama arrived to take his soul.
Thus, Yama had to restore the life into Satyavan so that Savitri can have children.
Lord Yama agreed to all her wishes and was about to leave taking Satyavan along.
Savitri stopped him saying how is it possible to have a son without her husband Satyavan.
Savitri begged Yama to restore Satyavan and take her life instead, which he could not do.
Lord Yama was trapped in his own words and
thus he had to give back the life of Satyavan seeing the devotion and pureness of Savitri.
In order to give Savitri her boon, Lord Yama had no choice but to restore Satyavan to life and so Savitri gained her husband back.