What does Genesis 50:5 mean?
Just before his death, Jacob commanded his sons to lay his body to rest in the family burial cave in Canaan (Genesis 47:29–30). Joseph will need Pharaoh's permission to leave Egypt to fulfill this request. Joseph has approached someone in Pharaoh's household to present these words to Pharaoh (Genesis 50:4). Most likely, this was because those in mourning were not permitted to be in Pharaoh's presence.Though the burial cave was purchased by Abraham for the family, it's likely Jacob cut out his own resting place within the cave, though he is never quoted as saying so himself. By the time he was reunited with Joseph, and moved into Egypt, he was already 130 years old (Genesis 47:9). Making such preparations would have been normal.
So far as we can tell, Joseph avoids mentioning what Jacob said about his allegiance to his fathers and the land of Canaan (Genesis 48:21). Perhaps he was concerned the Pharaoh would not approve of any perceived lack of loyalty to Egypt.
Joseph's request to leave Egypt, even temporarily, foreshadows similar requests made by Moses to another Pharaoh, centuries in the future (Exodus 5:1–4). The Pharaohs who rule during Moses' life will have neither knowledge nor honor for Joseph (Exodus 1:8), and so will not respond as warmly as does the Pharaoh of Joseph's era (Genesis 50:6).