Yayati, an ancestor of the Pandavas was an ancient king married to Devayani, the daughter of the powerful sage Shukracharya. The couple had children and apparently were happy together, or so Devayani thought. But Yayati, had also fallen in love with, married and had children with Sharmishta, who was Devayani’s personal maid. That Sharmishta was really a princess, daughter of the king of Asuras and how she came to be Devayani’s maid is a story for another day.
When Devayani came to know about Yayati’s infidelity with Sharmishta, she ran crying to her father, Shukracharya and demanded that Yayati be punished and she be given justice. Shukracharya promptly cursed Yayati to become old decrepit and impotent. King Yayati cried for mercy and Shukracharya softened the curse saying that Yayati could regain his youth and vigour if any one of Yayati’s sons, took on the curse on his behalf.
Yayati, asked each of his sons to take on his curse, but they all refused, except for the youngest son called Puru (born of the union of Yayati and Sharmishta). And so the father grew young and able again, while young Puru, hardly out of his teens turned into an old bent man.
Yayati lives on borrowed time from his son for a thousand years, trying to fulfil all his desires and responsibilities. After a thousand years, he realizes, that there is no end to desires and exchanges places with his son Puru again. Old Yayati hands over the kingdom not to his first born as is the custom but to his youngest son, Puru as a reward for his devotion and sacrifice.
Sons sacrificing their own desires, to fulfil that of their father’s is a recurring theme in Indian mythology.