Honoring the dead with prayers actually goes back to Genesis. And also, when Moses and the whole crew were leaving Egypt they took Joseph’s bones with them. If the dead were not important to them they’d a left him.
I never knew that they took Joseph's bones back with them.