Joseph became Governor of Egypt partly because it was God’s will and partly because his brothers acted wrongly which God used for Joseph’s good.
God always turn things around for the good of His own. Sometimes, things happen and we think why is this happening? Don’t forget that all things work for the good of those who trust God.
All things can include bad situations like a troubling condition, bad working place, irritating boss, etc.
All these, God is capable of using them for your good. So, never fret over any of these conditions, instead trust God and pray more and see your deliverance come sooner than you expected.