Nor does God need to get a bad rap for it. These things happen. What we learn from it seems to me to be the main thing.
It is extremely is difficult for us to grok the complex workings either of God, if you like the theistic view, or of karma--conditioning, interdependence and causation-- if you subscribe to eastern thought. The historical teacher named Buddha himself said one would have to be omniscient to understand all the interwoven causes, circumstances and conditions at play in any single event. God's acts are also said by sages and saints to be unknowable and mysterious.
The main thing, I think, is that we learn from experience, and this helps us to wise up and to open our hearts and minds and self-centered grasping, which changes everything, at least for us and those around us. Conscious inner work and spiritual practice does transform things, and does so on many levels.
We can work for a better world from outside in as well as from inside out. We must do what we can. We can learn to both act and understand better, and we must.