A question that has troubled people throughout the centuries is how can a good and sovereign God allow such evil in the world? If He were sovereign (in control) and good wouldn't He simply keep evil from happening? The answer seems obvious, "Yes." However, evil exists. Therefore, the only conclusion must be that He is either not sovereign, or not good. Both of these are horrible thoughts and, thankfully, light years away from the God who is and who is revealed in Scripture.
Preliminary matters. Before answering the why question, it is important to address a couple of items up front. First, we must come to grips with the fact that God is God and we are not. He doesn't fit into our boxes. Simply put, "My thoughts are not your thoughts, nor are your ways My ways,' declares the LORD. 'For as the heavens are higher than the earth, so are My ways higher than your ways and My thoughts than your thoughts" (Is. 55:8-9). The fact is, we just can't see everything from God's perfect and eternal perspective. He alone "declares the end from the beginning," and knows the best way to get to there. It took Job a lot of pain to reach the point he could rest there (Job 42:1-6). We would do well to learn from him and start there at the beginning.
Second, how we frame the question has everything to do with how we answer it. We must be sure not to put God on the witness stand to man (Rom. 3:4). God does not exist for us, we exist for Him as His image bearers. In other words, the question is not, "How can God allow evil?" Rather, it is "How can a holy God do good to us who are evil?" Evil entered through the world through human sin, not God's: "Through one man sin entered into the world and death through sin" (Rom. 5:12). The problem is that we are a sinful people and deserve God's judgement. It is amazing He withholds evil as much as He does and does us so much good (Acts 14:17).
But Why? Some may still say, "But that doesn't explain why God allowed evil to enter into the world and then let it remain?" Here we must remember the first point: God's wisdom exceeds our own. It is impossible to answer all the why questions, especially in specific cases of suffering. We just don't know, but our good God does. "The secret things belong to the LORD our God, but the things revealed belong to us" (Deut. 29:29). It is important we don't get caught up in what we can't answer and instead focus on what God has revealed.
God's primary purpose in creation, in the universe, is His own glory (Ps. 19:1; Is. 43:7). This is hard for some to stomach, but it sets the foundation to understand the answer to why. If evil exists, then He must intend, somehow, to glorify Himself by it.
God ordains evil as a means to display His own glory and character. For example, God displays His holy justice when He punishes sin. God hardened Pharaoh's heart so that He could multiply His wonders and His glory (Ex. 7:3) and magnify His Name before the Egyptians and His people: "I will harden Pharaoh's heart, and he will chase after them; and I will be honored through Pharaoh and all his army, and the Egyptians will know that I am the LORD" (14:4). God displays His sovereignty over the evil designs of men (Gen. 50:20) and nations (Is. 10:5-14). God displays His compassion in comforting those who suffer because of evil (Deut. 32:6; Judges 2:18). God displays His grace in forgiving those who commit evil but repent and trust in Him (Ps. 32:1-7).
Jesus Christ is the Ultimate Answer. The ultimate answer we must look to and the ultimate display of God's glory and purpose at the cross. Jesus said, just hours before His betrayal, "Now My soul is troubled; and what shall I say, 'Father, save Me from this hour'? But for this purpose I came to this hour. Father, glorify Your name.' Then a voice came out of heaven: 'I have both glorified it and will glorify it'" (John 12:27-28; cf. 13:31-32; 17:1). God's ultimate display of His glory and His purpose in ordaining sin is the Son suffering as a substitute for sinners. Jesus, the suffering servant, "Was foreknown before the foundation of the world" (1 Peter 1:20). This means, before creation God purposed the cross. In one sense, then, the greatest suffering for sin was endured by God Himself, and that by an act of His own will, "The LORD was pleased to crush Him, putting Him to grief … as a result of the anguish of His soul, He will see it an be satisfied … He Himself bore the sin of many" (Is. 53:10-12). The Father caused the suffering of the Son for sinners. The Son endured suffering from the Father for sinners. By this God determined the supreme display of His glory: the defeat of sin and evil at the cost of His own suffering, for His glory and the everlasting joy of His people.
The cross of Jesus Christ brings it all into a perspective of glory, worship, and hope. The cross demonstrates God's eternal and limitless love to those who trust Him (Rom. 5:8-10; Titus 3:4-5). The cross upholds God's justice in the salvation of sinners (Rom. 3:25-26) and the judgement of those who reject (John 3:19). The cross provides the grounds and proof of all of His unfailing compassion and grace to those who rest in Him (Rom. 8:32; 2 Cor. 1:8-9; 12:7-10). The cross points us to the end of the story: a new heaven and new earth where sin will be forever removed, and "He will dwell among them, and they shall be His people, and God Himself will be among them, and He will wipe away every tear from their eyes; and there will no longer be any death; there will no longer be any mourning, or crying, or pain; the first things have passed away … there will no longer be any curse … they will see His face, and His name will be on their foreheads" (Rev. 21:3-4; 22:3-4).
God has good planned in the end for those who trust in Him and His work in the death, resurrection, and soon return of the Son. God does not reveal all His specific purposes in suffering and evil in the world, but He is sovereign over it, He has defeated it, will forever remove it, and will sustain His people by grace and hope eternal until He brings it about (1 Peter 1:3-9; 2 Cor. 4:16-18; Rom. 8:18-21).
Until that day we will need to trust Him and encourage each other to do the same (Heb. 10:23-25). We point each other to the cross and our eternal hope in glory when we will be with Him forever and see Him face to face. In this way, we come to know Him more intimately (John 17:3; Phil. 3:10), and when we know Him better we are able to humbly trust Him more and ultimately let His glory, grace, and wisdom be a more than a sufficient answer to why there is so much evil and suffering.