Moses took the bones of Joseph with him because Joseph had made the sons of Israel swear a solemn oath when he said, “God will surely attend to you, and then you must carry my bones with you from this place.”
Jewish Publication Society of America Version (JPS1917) - Exodus 13:19 >And Moses took the bones of Joseph with him; for he had straitly sworn the children of Israel, saying: 'God will surely remember you; and ye shall carry up my bones away hence with you.'