TT #75 · Parashas Vayechi · Passuk 50:25
So Joseph made the sons of Israel swear, saying, “When God has taken notice of you, you shall carry up my bones from here.”
Torah Temimah cites Kesubos 111a.
Kesubos 111a connects Joseph’s concern about his burial with the special circumstances of the Cave of Machpelah.
English: Joseph knew himself to be righteous and was concerned that his bones might not travel through the tunnels to the Cave of Machpelah.
Aggadic explanation of Joseph’s request that his bones be carried up from Egypt.
Joseph’s awareness of his own righteousness explains why he carefully arranged for his burial remains to accompany Israel: he did not want his bones delayed by the sin of the Egyptians’ burial practices.