[(Leviticus 8:2:) TAKE AARON AND HIS SONS.] This is what Scripture says (Proverbs 20:7): "The righteous one walks in his integrity; blessed are his children after him." This refers to Aaron and his children. If <the matter is determined> by this saying, then Moses too was righteous, yet his children were not like him; and Eli too was righteous, yet his children were not like him; and Samuel was righteous, yet his children were not like him, for (I Samuel 8:3) "his sons did not walk in his ways, etc." Why, then, do you say "The righteous one walks in his integrity"? Because he saw his children after him, in his lifetime, ministering in the High Priesthood. Therefore (Leviticus 8:2): "Take Aaron and his sons with him."
Why Aaron Saw His Sons Serve as High Priests After Him
Midrash Tanchuma Buber, Tzav 13:1
[קח את ארן ואת בניו]. זש"ה מתהלך בתומו צדיק אשרי בניו אחריו (משלי כ ז), זה אהרן ובניו, אם מן הדבר הזה, אף משה היה צדיק ולא היו בניו כמותו, ואף עלי היה צדיק ולא היו בניו כמותו, ושמואל צדיק [היה] ולא היו בניו כמותו, ולא הלכו בניו בדרכיו וגו' (ש"א ח ג). למה אתה אומר מתהלך בתומו צדיק, שראה בניו אחריו בחייו משמשים בכהונה גדולה, לפיכך קח את אהרן ואת בניו אתו.