Rabbi Yehuda bar Simon and Rabbi Ḥanin in the name of Rabbi Yoḥanan: Anyone who begins a mitzva and does not complete it, buries his wife and his children. From whom do you derive this? It is from Judah. “Judah said to his brothers: What profit is it [if we kill our brother and conceal his blood?]” (Genesis 37:26).

He should have borne him on his shoulder to his father. What did it cause for him? He buried his wife and his children. Rav Huna in the name of Rabbi Eliezer son of Rabbi Yosei HaGelili: Anyone who begins a mitzva and does not complete it, but another comes and completes it, it is attributed to the second one.

That is what is written: “Joseph’s bones, which the children of Israel took up” (Joshua 24:32). Did Moses not take them up, as it is stated: “Moses took Joseph’s bones with him” (Exodus 13:19)? But since it was decreed upon him that he would not enter the land, and these [the children of Israel] tended to them, it is therefore attributed to them. “Joseph’s bones…” (Joshua 24:32) – they analogize it; to what is the matter comparable?

To robbers who entered a certain wine cellar. They took a particular jug and drank. The owner of the cellar peered at them. He said to them: ‘May it be pleasant for you, may it be enjoyable for you, may it be sweet for you.

You drank the wine, restore the jug to its place.’ So, the Holy One blessed be He said to the tribes: ‘You sold Joseph. Restore his bones to their place.’ Another matter: Joseph said to them: ‘To the place from which you abducted me, return me’ – “are your brothers not herding in Shekhem?” (Genesis 37:13).21This proves that the sale of Joseph took place in or around Shekhem.

That is what the children of Israel did: “Joseph’s bones, which the children of Israel took up from Egypt, they buried in Shekhem” (Joshua 24:32).