According to the sages, “This shows Moses’ wisdom and piety; all Israel were busy with the spoils of Egypt, but Moses busied himself with the remains of Joseph” (M’chilta).
How does Moses’ act show wisdom?
Fast forward to the Red Sea. The Psalmist says, Ha-yam ra’ah vayanos – “The sea looked – and fled” (Psalm 114:6). What did the waters see? The answer which the rabbis give is that they saw the bones of Joseph.
Because Joseph had fled from the wife of Potiphar, he was rewarded years later by the waters fleeing from him as an act of admiration for his ethical courage.
Since it was due to Moses that Joseph’s remains came with the people, the retreat of the Red Sea was owed to Moses’ policy. The crossing of the Red Sea would not have been possible otherwise. The whole of Jewish history would have been different – and maybe it would never have happened.
Moses is an example of the fact that a decision which others question at the time so often turns out in hindsight to be right and appropriate.
Did Moses know how wise he was? Maybe not, but he knew that Joseph had wanted his bones to be taken up from Egypt to the Promised Land (Gen. 50:25), and the promise made to Joseph on his death bed had to be fulfilled.