Not all suffering can be explained. There is pain, sometimes, that is not punishment and not repair.
True, we were given Torah, a G-dly wisdom containing the secrets of all things. But concerning these things even Moses asked and was told to be quiet, to cease to ask. Because there are some things that even G-dly wisdom does not explain. Because they cannot be explained.
We can only know that whatever happens is from G-d, that G-d is just, and that He does not desire suffering.
But until the end of days, we will have to suffer the 'why'.