The genealogy was very important in Vedic culture, because everyone felt great pride of being a descendant of a very noble lineage, no matter who they were. Therefore it was very important for Maharaja Pariksit to know from which lineage Lord Krisna has come, and Yadavas were the ancestors of King Yayati. But how it could be, thought Maharaja Pariksit, that King Yayati could take Devayani as his wife, because she was from brahmana caste while King Yayati was a very powerful ksatriya. Noble people would not allow this pratiloma marriage to take place.
Kacha the elder son of Brihaspati was sent to Sukracharya by the demigods to learn mrityu-sanjeevani art from him. Kacha offered his service to Sukracharya, and he agreed. He served very diligently herding cows, and also he had to sing and dance in front of Sukracharya’s daughter Devayani. As a result she fell in love with Kacha. Demons decided to kill Kacha to destroy the demigods' plan. They killed him, cut his body into pieces and gave them to wolfs. Devayani insisted that her father Sukracharya revived Kacha. After Kacha came back he told Devayani what happened.
A few years later demons killed Kacha again, burned his body and put the ashes into the wine that Sukracharya drank. After that Devayani began to beg her father to revive Kacha again, but in meditation Sukracharya found Kacha in his own belly. Devayani kept begging Sukracharya, so he decided to teach Kacha in his subtle form this mrityu-sanjeevani art because after he would come out from Sukracharya’s belly he would have to revive Sukracharya. Kacha agreed and said that after this he would be his son, because he would be born from Sukracharya’s body. After this Kacha served Sukracharya till the time of his service was up. When he was about to leave Devayani said that he was alive and got this mantra because of her, so he had to marry her. Kacha replied that she was a daughter of his guru, a worshipable object for him, therefore he rejected to marry her. Devayani got very angry and cursed Kacha that he would never be able to use the art of mrityu-sanjeevani. He accepted it calmly and said that her curse was against dharma, therefore he had to curse her back that she would not get a brahmana as her husband.
The caste system was very scientific in the Vedic time, therefore the only recommended marriages were among the same varna. Because the natures are compatible, it makes marriage happy and stable. Varna-sankara makes people very sinful because of the idle mind, which is not focused. Therefore in Vedic culture pratiloma marriages were completely prohibited. Anuloma marriages were allowed to a certain extend.
We have to respect varnasrama culture, but still we should give prominence to bhakti, because bhakti is more important. If we want to create the real society of devotees we have to learn how to appreciate devotion, which is much more difficult, because it’s internal. Anyone can become a great devotee, it’s just a question of his sincerity.