The question implies that if a good God exists, then evil shouldn't because God, being all powerful, should stop it.
We need to ask and answer two questions. First, what is evil? It is that which is against God. It is anything morally bad or wrong. It is injurious, depraved, wicked. Some acceptable examples might be murder, rape, stealing, lying, and cheating. Second, if we want God to stop evil, do we want Him to stop all evil, or just some of it? In other words, if just some of it, then why? If He were to stop only part of the evil, then we would still be asking the question, "Why is there evil in the world?"
Let's suppose that someone was about to commit murder. God would have to stop him, maybe whisper in his ear, or if that didn't work, do something a little more drastic, like have something fall on him, or stop his heart, or make his hands suddenly fall off. Anyway, God would have to do something.
What if somebody wanted to steal? God would have to stop him too, right? Undoubtedly, God's imagination would permit a more practical method than I have suggested, but the end results would be the same.
What about lying? If someone were to tell a lie, then to be consistent wouldn't you want God right there to stop that person from lying? After all, He couldn't let any evil occur, could He?
Let's take it a step further. Suppose someone thought something evil. Then, of course, God would have to step in and prevent him from thinking anything bad at all, right? The end result would be that God could not allow anyone to think freely. Since everyone thinks, and no one thinks only pure thoughts, God would be pretty busy, and we wouldn't be able to think. Anyway, at what point do we stop - at the murder level, stealing level, lying level, or thinking level? As your question implies, if you want God to stop evil, you would have to be consistent and want Him to do it everywhere all the time, not just pick and choose. It wouldn't work.
Evil is in this world partly because we give it its place but ultimately because God, in His sovereignty, permits it and keeps it under His control.
Then you might say, "Couldn't He just make us perfect and that way we wouldn't sin?" He already did that. He made a perfect angel, Satan, but he sinned. He made a perfect man, Adam, and he sinned. He made a perfect woman, Eve, and she sinned. God knows what He is doing. He made us the way we are for a purpose. We don't fully understand that purpose, but He does.
God is sovereign; He has the right to do as He wishes. He has the right to permit evil for accomplishing His ultimate will. How can He do that? Simple, look at the Cross. It was by evil means that men lied and crucified Jesus. Yet God in His infinite wisdom used this evil for good. It was on the Cross that Jesus bore our sins in His body (1 Peter. 2:24) and it is because of the Cross that we have forgiveness of sins.
Consider the biblical example of Joseph in the Old Testament. He was sold into slavery by his brothers. Though they meant it for evil, God meant it for good (Gen. 50:20). God is so great that nothing happens without His permission, and in that permission His ultimate plan unfolds. In His plan He is able to use for good what man intends for evil. God is in control.