This is a question a lot people ask, especially when they are experiencing pain, injustice, and suffering. God did not intend for this world to be filled with evil.
Right from the beginning, everything created by God was good and perfect. The origin of evil was as a result of sin and disobedience. When man chose to go against the will of God, sin entered, and it brought along suffering. A great proportion of evil we see today is attributed to the hearts which turned away from God.
James 1:15
Then when lust hath conceived, it bringeth forth sin: and sin, when it is finished, bringeth forth death.
God is not the originator of evil. He freewill available to man , which is the ability to choose without being compelled. Sadly, many went ahead to choose selfishness, hatred, pride, and violence instead choosing love and obedience. When people reject the ways of God, evil becomes the order of the day.