ALL THE QUOTATIONS HERE ARE VERSES FROM SANSKRIT VYASA MAHA BHAGAVATA
eete kṣheetra-prasuutaa vai punas tv aangirasaaḥa smṛutaaḥa
rathiitaraaṇaam pravaraaḥa ksheeetroopeetaa dvi-jaatayaḥa.
(CONTEXT: In verse No. 2, King Ratiitara was without children. At his request, sage Angirasa caused pregnancy to Ratitara's wife.) As the sons were born to Ratitara's wife's womb, there were considered as sons of Ratiitara. But as the semen was of priest Angirasa, they were considered as Priests by caste.
CRITICAL REMARK: Kings were going down to the level of sending wives to teachers for begetting children, just for the sake of continuing their dynasty.