Continuing the discussion of examples of middah ke-neged middah (measure for measure) in a positive sense, the Mishna (9b) points to Yosef who personally took responsibility to bury his father (see Bereshit 50:7) and in turn had his own burial needs tended to by Moshe (see Shemot 13:19), who, in turn was buried by God, Himself (see 34:6).
Our Gemara discusses how in the midst of preparation for the Exodus, while the rest of the Jewish people were busy taking property from the Egyptians, Moshe chose to involve himself with the mitzva of tending to Yosef’s bones, preparing to take them to Israel. It was, apparently, a difficult task to find Yosef’s remains, and the Gemara offers two explanations as to where they were. According to the first, he had been placed by the Egyptians in a metal box and placed in the Nile so that its waters would be blessed by his presence. The second possible place is suggested by Rabbi Natan who says that he had been buried in the kabbarnit shel melakhim – apparently the burial crypt of the kings. In either case, the Gemara describes how Moshe called out to Yosef asking him to reveal himself in order to be taken for burial in Israel.
The Maharsha points out that according to the Midrashim, it was not only Yosef’s remains that were taken out of Egypt during the Exodus; all of the tribes took their forefathers’ remains with them. Nevertheless, only in Yosef’s case had the Egyptians taken an interest in burying him according to their traditions. Therefore, in all the other cases the place where the father of the tribe was buried was well known.
In fact, the Midrash offers an alternative reason to why Yosef had been placed in the Nile – that since the Egyptians knew that Yosef had made his brothers swear to take his remains with them to Israel (see Bereshit 50:25), they hid him in the hope that it would keep them from leaving.