Can anybody share any sources that discuss the question of why the Priesthood was hereditary? There are plenty of sources that discuss why, specifically, the family of Aaron was chosen for that honor -- but all of them seem to take for granted that it is going to be a hereditary institution, and focus on the question of which family would be chosen. There are other possibilities -- for example, a system in which anybody could take vows and pledge themselves to the priesthood. I have even found a document that says that in ancient Egypt, during the Middle Kingdom (2055-1650 BCE), "people began to purchase priest positions". Do any sources discuss the reason for a hereditary priesthood?
וַיְהִ֕י כִּֽי־יָרְא֥וּ הַֽמְיַלְּדֹ֖ת אֶת־הָאֱלֹהִ֑ים וַיַּ֥עַשׂ לָהֶ֖ם בָּתִּֽים׃ And [God] established households for the midwives, because they feared God.
The רבינו בחיי on the pasuk:
ואולי הטעם הזה כי המילדות האלה נתן להן הכתוב מעלת הזכרים בשכר המצוה שהן מתעסקות בה להחיות הזכרים,... And perhaps the reason for this is because the scripture [G.od] gave these midwives the virtue of males [the priesthood] in return for the mitzvah that they engaged in to save the males [from pharaohs decree to kill all males]... (My translation)
So, someone correct me if I'm wrong, the hereditary nature of the kehuna seems to be a gift to the midwives in return for them saving the Jewish babies.