Moses carried the bones of Joseph with him, because before Joseph died, he had made the Israelites promise to do this. He had said, “When God saves you, remember to carry my bones with you out of Egypt.”
Later their bodies were moved to Shechem and put in a grave there. (It was the same grave Abraham had bought for a sum of money from the sons of Hamor in Shechem.)
When the Israelites left Egypt, they carried the bones of Joseph with them. They buried them at Shechem, in the land Jacob had bought for a hundred pieces of silver from the sons of Hamor (Hamor was the father of Shechem). This land now belonged to Joseph’s children.