It is only our mortal arrogance that makes us think we can or should understand G-d or the way He lets us makes our own choices. If we did, we'd be like HaShem himself, and that contradicts the whole religion thing.
The whole struggle to accept that we will never understand all the things G-d allows to happen is a very important part of faith and it takes a very long time, even a whole lifetime and beyond to realise. Most of the negative things that He allows to happen are the results of the same freedom given by Him that allows us to experience joy.
Without struggles, without pain, without the bad things we wouldn't know true happiness. As Joseph Smith wrote in the Book of Mormon, there needs to be an opposition in all things. While I now think that the BoM is a fraud and it was written by Smith, this is one of the things that always rang true.