Joseph got a raw deal for being honest, loyal and faithful. He refused to succumb to his master's wife's overtures and sleep with her. Consequently he got thrown into prison on false charges. It seems unfair: being penalized while actually striving to remain faithful and obedient to God. But Joseph's life story shows that he had to be in prison at that particular time for God to use him.
Similarly, the trials in our lives are strategically arranged. They occur at specific times (even though we don't realize it) to lead us towards God's purpose for us. They also serve to teach us necessary skills we lack. Each individual is an instrument, as are the trials in her life, to bear fruit for God, to help others and to build up oneself.
So whatever happens, we must not compromise on obedience to God, although they seem to place us in uncomfortable and painful situations. Those situations are meant to build us up as well as others. And to fulfill God's perfect plan for ourselves as well as others.
Had Joseph never been in prison, he would never have known that God could use him to interpret dreams.
*God shows us the skills we have, and which He will use as part if His plan.
Had Joseph never interpreted dreams, he would never have been led to Pharoah.
*God leads us to the people we are meant to help
Had Joseph never been led to Pharoah, he would never have been appointed prime minister of Egypt.
*God uses trials to direct us to take up positions he needs us to fill.
Had Joseph never been appointed prime minister of Egypt, he would never have been able to save the people of Egypt or other lands from the great famine that swept across nations.
*God uses our trials as stepping stones towards helping others, to bear fruit for His kingdom.
Had all these preceding events not occurred, his family would have died of starvation. Joseph's tough times led him towards a bigger picture: to help save Israel and his sons. His trials played a part in the fulfillment of God's promise to Abraham, to make his descendants a great nation.
*God uses trials to fulfill His promises to us and His people.
So never compromise obedience to God. Even when the cause tough times for us. These tough times are momentary. And these tough times are where God can move for you and use you.