Every day, there is a new reason to ask why does God allow evil to exist? Why doesn't he stop this or that from happening? Why better answers would require more time, here's some concise help from Exodus 9 and 10. They are directly from God's mouth, as he explains the plagues and why he tolerated the wickedness of Pharaoh, including Israel's slavery.
For this time I will send all my plagues on you yourself, and on your servants and your people, so that you may know that there is none like me in all the earth. 15 For by now I could have put out my hand and struck you and your people with pestilence, and you would have been cut off from the earth. 16 But for this purpose I have raised you up, to show you my power, so that my name may be proclaimed in all the earth.
V 14 say God is the one who would send the plagues. Verse 15 says he is tolerating Pharaoh's ongoing evil. Think of the extensive suffering that resulted both from the plagues and Pharaoh's rule.
Yet, verse 14b and verse 16 tell us why he ordained those evils as well as all the ones we see today, "for this purpose I have raised you up, to show you my power, so that my name may be proclaimed in all the earth."
Exodus 10:1-2 echoes this idea again, though God's action in verse 1 raises the theological stakes:
"Then the LORD said to Moses, "Go in to Pharaoh, for I have hardened his heart and the heart of his servants, that I may show these signs of mine among them, 2 and that you may tell in the hearing of your son and of your grandson how I have dealt harshly with the Egyptians and what signs I have done among them, that you may know that I am the LORD.""
Sadly, our contemporary Christianity has no place for God's glory. It makes no sense to us that God's self-glorification would ultimately be most loving to His people. We tend to be a short sighted people.
For Further Reading: