This is something mankind has had to deal with since Adam and Eve sinned in the garden. You may gain some insight from Jesus’ parable of the wheat and tares:
Matthew 13: 24 “The kingdom of heaven is like a man who sowed good seed in his field. 25 But while everyone was sleeping, his enemy came and sowed weeds among the wheat, and went away. 26 When the wheat sprouted and formed heads, then the weeds also appeared.
27 “The owner’s servants came to him and said, ‘Sir, didn’t you sow good seed in your field? Where then did the weeds come from?’
28 “‘An enemy did this,’ he replied.
“The servants asked him, ‘Do you want us to go and pull them up?’
29 “‘No,’ he answered, ‘because while you are pulling the weeds, you may uproot the wheat with them. 30 Let both grow together until the harvest. At that time I will tell the harvesters: First collect the weeds and tie them in bundles to be burned; then gather the wheat and bring it into my barn.’”
40 “As the weeds are pulled up and burned in the fire, so it will be at the end of the age. 41 The Son of Man will send out his angels, and they will weed out of his kingdom everything that causes sin and all who do evil.
49 This is how it will be at the end of the age. The angels will come and separate the wicked from the righteous 50 and throw them into the blazing furnace, where there will be weeping and gnashing of teeth.
I don’t have an “easy” answer for why God allows evil but scripture makes it clear that through it all, God is in control. I believe part of why evil is present is because man is created with “free will”, we have the choice to try and live Godly lives or to do evil. If we were created with anything but free will we would be nothing more then a robot, programmed to follow a certain order of life.
As harsh as it may seem throughout the Bible when Gods children stray from him he has allowed persecution (evil) to drive them back into his arms.
Hope this helps. God Bless!