וַיָּשָׁב יוֹסֵף מִצְרַיְמָה הוּא וְאֶחָיו וְכָל-הָעֹלִים אִתּוֹ
Rashi says that on the way back from Canaan the Mitzriyim honored Yosef's brothers and let them travel ahead of them as a sign of respect. On the way to Canaan the Mitzriyim went ahead of his brothers and did not show them respect. The reason for this was because in Canaan the Mitzriyim saw the honor accorded to Yosef and his brothers so they accorded them honor as well.
Why did the Canaanites respect the brothers more than the Mitzriyim?
The main reason for the golus is because yidden are downtrodden in their hearts and are not strengthened by the knowledge of their value in Hashem's eyes. If they believed in Hashem's steadfast love for klal yisrael they would be strong and joyful and would not feel downtrodden in their hearts because of their reliance on Hashem. Anyone who would see them, even other nations, would immediately recognize that they are zera bairach Hashem, special and dear in Hashem's eyes, and the nations would not persecute and enslave them because of their unique status.
Hashem told Avraham: כי גר יהי זרעך בארץ לא להם. Meaning that klal yisrael will feel like lowly strangers in their own eyes. That will be the beginning of the exile, with other nations persecuting them and enslaving them. As long as one of the shevatim was alive the decree of exile did not start because the shavatim had the proper attitude and sensed their unique status, with emuna in the special love Hashem has for them.
The Zohar gives a mashal of a king's son who was banished from the palace because of his failings. His father, the king, would send his son food and all his needs through his servants. The son knew and understood that the servants were only emissaries of the king and if he would improve himself he would go back to getting his needs directly from the king.
The same applies to the yidden who came to Mitzrayim. As long as any of the shevatim were alive they had the proper attitude and deep conviction of the unique love Hashem has for klal yisrael and they therefore felt strong and uplifted. But once the shevatim died the yidden lost that fortitude and did not have the conviction of their value. They thought that any sustenance they were receiving was coming from the Mitzriyim and not from their Father/King - Hashem. The Mitzriyim picked up on that and proceeded to dominate them.
The downcast feelings of klal yisrael had another effect. The Jews turned against each other. The slandered each other and denounced their brothers to the authorities. Moshe Rabenu said, "achen noda hadavar", now i see how they came to be enslaved, because of gossip and slander, caused by their skewed self-image.
Even though the shevatim were not subjected to the full degradation and deprivation of the golus, they were included in the gezeirah of "ki ger yiyeh zaracha". Therefore the Mitzriyim did not respect the shevatim as would be fitting according to their status. The Canaanites, who had no such directive of "ki ger yiyeh zaracha" did show respect to the shevatim and when the Mitzriyim saw that they changed their attitude as well.
Rebbe Avraham of Slonim, Baal Yesod Ha'avoda, Toras Avos