It's a Divine plotline. All those things had to happen to Joseph to put him in a certain place at certain time for a certain reason.
It all makes sense in the end. The Torah account isn't even the full story of Joseph, but indicates what there is to look foward to (the great deliverance and the family reunion of all family reunions) no matter how hopeless things might seem on the surface.
The keys of deliverance were located in Egypt, aka the house of bondage. It would be one way of explaining why the word key is in literally in the end letters of name of Joseph, "shem Yoseph Tzaphnat Pa'ane'ach".
Take that back 30 years earlier with the meaning of the name Joseph, and what Rachel said, "the Lord shall add to me ANOTHER son."
Joseph is known as Joseph "ha-Tzaddik", Joseph the Righteous. Ha-tzaddik = 209 = achar (another) = ba-ohr, in the light.
It's David who unified the tribes and it is David who is the one king one shepherd over the reunified tribes (Eze 37).
There's more to literal genealogies than people think, as two families are united by the birth of a child.
The Divine narrative has chugged along, noone the wiser..
Remember what Tootle was told over and over, but he didn't listen?
"Stay on the rails no matter what."
Amen, left that other site
Joseph is like Jesus in the way he stood against the prevailing corruption of the day - a root in dry ground.
Joining in prayer for the Peace of Jerusalem and for revival in our beloved America.
Joining in prayer. God bless.
Amen