When we don't understand what God is doing or why, His ways can seem perplexing. The times when ungodly people seem to triumph over the righteous make us scratch our heads and wonder why the Lord doesn't intervene. But the truth is, He often uses the wicked to accomplish His purpose.
Joseph faced one hard-hearted individual after another during his years in exile. His brothers shipped him off to Egypt. His boss's wife accused him of an unspeakable crime. And even those he helped, like Pharaoh's cupbearer, forgot about him (Gen. 40:23). The actions (or seeming inactions) of God make little sense at this point.
But once the story of Joseph's life was written in full, it was clear that everyone who harmed or neglected the young man contributed to God's plan. The Lord used numerous people across several years to bring a humbled young Hebrew unexpectedly to power at the right moment to spare his family--who were the Messiah's ancestors--from the effects of famine.
In our circumstances, we can see God's actions only from the limited vantage point of our humanness. We experience the events He has allowed or caused but can't discern what He is thinking. Often the Lord's goals and purposes are hidden from us until His plans come to fruition.
God is sovereign over all the earth. We may wonder at the strange or even terrifying turns our lives take, but we can be certain that He is in control and at work. The wicked may triumph for a season, but the final, eternal victory belongs to Christ and His righteous followers.