The family was unable to remove Yosef’s body from Egypt. Indeed, had Yosef not been under oath to remove Yaakov’s body from Egypt for burial, it would also have been impossible. Horav Avigdor Miller, Shlita, suggests that these instances demonstrate the enormous impossibility of having procured permission for the entire Bnei Yisrael to leave Egypt. Since this was the situation under Yosef’s rule, how much more inconceivable would this venture be some 210 years later under the tyrannical Egyptian bondage. They might have despaired and completely assimilated in response to the hopeless situation, had it not been for Yosef’s dying words of encouragement.
The book of derech eretz ends with this thought. Even though the Torah could have commenced with halachos, laws, Hashem chose to make Sefer Bereishis the preface to the laws of the Torah. This is consistent with the dictum of “derech eretz kadmah La’Torah.” Before one can fully appreciate Torah and apply its laws properly, before one can become a member of the chosen people, one must first be a righteous man, a “Torah mench.”
Horav Miller explains that derech eretz attributes are all encompassing. derech eretz embraces the qualities of decency, kindliness, self-control, loyalty and mental awareness. Derech eretz applies to all relationships between man and Hashem, as well as between man and his fellow man. The conduct of the Avos, Patriarchs, serves as a model for us to emulate. Yosef’s behavior vis-a-vis his brothers, while he was in captivity, and during his sojourn as a world leader in a decadent society, all serve as a paradigmatic lesson for us. The entire narrative of Sefer Bereishis was a prerequisite for this great people developing into the am ha’Nivchar, chosen nation, and meriting the status of banim la’Makom, children to Hashem.