Aharon was the first kohen and his sons inherit this status from then on (Shemot 28:1); their major role being to make offerings in the Temples on behalf of all of Israel.
Aside from being a practical way of guaranteeing that there are enough people to serve in the temples, what is the reason behind continuing the merit of Aharon through his sons? Why did the Torah choose this rather than through some sort of case by case decision based on merit, especially on something so important e.g. only the wise/learned or young/strong could serve.
A teaching in Pirkei avot (2:12: "והתקן עצמך ללמוד תורה, שאינה ירושה לך") suggests that Torah wisdom is not inherited i.e. you'd better be sure that you learn it of your own merit.
Kingship is another status that doesn't need to be passed on to your son although it may seem the natural choice for the next king if that son is indeed fitting for the role.