In my view, there are two answers to this.
1. God gave us free will as humans, to test if we are good people and if we choose to help others or choose to cause suffering.
2. Bad things need to happen in the world. That might sound terrible, but if bad things didn't happen, how could we...