TT #62 · Parashas Vayechi · Passuk 50:07
So Joseph went up to bury his father; and with him went up all the officials of Pharaoh, the senior members of his court, and all of Egypt’s dignitaries.
Torah Temimah cites Sotah 9b.
English: “And Joseph went up.” With the measure by which a person measures, he is measured. Joseph merited to bury his father, and there was no brother greater than he; therefore Moses, who was greater than all Israel, merited to deal with him, as it is stated, “And Moses took the bones of Joseph with him.”
Measure-for-measure derash connecting Yosef’s burial of Yaakov with Moshe’s carrying of Yosef’s bones.
Yosef’s attention to his father’s burial becomes the reciprocal merit that later allows Moshe to attend to Yosef’s burial.