I am currently reading through the book of Daniel with the help of Doug Ingram's little commentary ('Daniel - People's Bible Commentary', BRF, 2006). Chapter 3, verses 19 to 25 give the account of Shadrach, Meshach and Abednego being thrown into the fiery furnace with its huge reminder that God is with us even when the world throws its worst at us. As Ingram comments: "It is often pointed out that the real significance of this passage is that God doesn't prevent the three men from being thrown into the fire, but comes to them in it."
The point is, Ingram again: "God does not always prevent .. suffering: it is the testimony of many, though, that God has come to be with them in a special way at such times."
I am not going to say anything other than that suffering hurts. Why it happens is one of the recurrent questions, raised most recently with me in a class on Luke in Zimbabwe when I made reference to one of those passages where Jesus refers to his own forthcoming death, something which left the disciples completely mystified. They didn't understand which is why they fled when the time came.
It is not an easy question and, in the end, all I can say is that God has the bigger picture - but also that God does promise to be with us.