Every story the Torah tells you is meant to guide you in your life. 

What are you meant to take from the story of Joseph and his brothers? 

You already believe that everything is in G‑d’s hands. You also trust that all that He does is for the good. 

But now you learn more:

Even when your own brothers throw you in a pit and sell you as a slave,

And even if they were somewhat justified, because you were a tattle-taling little brother, to such a degree that they suspected you of plotting against them,

And even if, in return for your excellent management skills, legendary self-control and firm principles, you were slandered and thrown into a dungeon,

Even then, everything is for the good. Because it is still all in G‑d’s hands.

And, even more counter-intuitively, precisely because it all looks so bad, it takes you to a place that a life of perpetual success could never attain.

Don’t mess up your life. But if you do, don’t give up hope.

You can’t wrestle control out of G‑d’s hands. Trust in Him, do the best you can, and He will reveal how everything is for the good.