Why Yosef Went Down First
The Be’er Mayim Chaim cites the masorah that places a cantillation mark on the word es in “to pasture” (37:12). He sees in it a justification for the conduct of the holy twelve tribes, the Shivtei Kah, whose deeds toward Yosef were plainly wrong: they tried to kill their brother and finally sold him, forcing Yosef HaTzaddik, who symbolized righteousness, to descend to Egypt, into the depths of depravity and licentiousness, for Mitzrayim is known as Ervas Ha’aretz. All of this, he explains, was part of Hashem’s plan, so that when Bnei Yisroel were liberated they would have shown that they had succeeded in guarding the holy Bris Kodesh. This rests on the tradition in Shir HaShirim Rabba (4:12) that the gan na’ul, the “locked garden,” refers to the chastity of the males, and the gal na’ul, the “locked mound,” to the purity of the females. They succeeded through the merit of Yosef, who withstood the test and did not succumb to Potiphar’s wife. By this act he overcame the great husk of impurity, broke its power and subdued it, paving the way for Bnei Yisroel to withstand the tests of Mitzrayim. This is why Yosef had to descend first, followed by Yaakov, so that his sons could together withstand the subjugation and slavery there and prove worthy of Kabbolas HaTorah.
Source: Be’er Mayim Chaim, Bereishis, Vayeshev (on Bereishis 37:12)