All the three days the residents of Yamapuri wanted to play host to him, but Naciketas wouldn either eat nor accept any thing ‘Until I get taught what I sought, why would I take food, or for that matter, anything else?’ said he, with his mind anxiously set on his goal.
Then it is that Yama, the terror of the three worlds, became fearful of this bachelor boy, lest the sin of keeping him for three days stay without food at his place might consume Yama himself.
So he gives the boy three boons, one for each of those days. Of the three boons, the important one was the third wherein the boy asked to be taught the philosophy of the Atman.
Before Yama gave the supreme teaching to Naciketas, he put the boy to a test just to confirm the intensity of his mumukShutA (longing for mokSha).
Or maybe Yama knew it all; he may just have wanted to put the boy to a test just to showcase to the world at large this ideal mumukShu.