Why does God allow the death of innocent children, like in school shootings?**
Because we have free will. Killing is something that we do to each other, and we can stop these bad things from happening. This isn't God’s responsibility, but ours.
If you are thinking that God should take away free will, you must not realize that it would be the end of all of us. You may say that you merely want God to stop people from doing bad things—but leaving our free will intact—but that is not possible. When you have a wicked thought in your head, should God change it to a thought of something innocuous? He would be playing with our heads—would still be human?
** Two notable examples are the primary schools at Dunblane, Scotland (1996) and Newton, Connecticut (2012). Sadly, there are dozens more, perhaps most famously the massacre at Columbine High School, in Colorado (1999).