There are several tenets of Christian philosophy at work here, but I believe that even the most difficult questions should be answered with simplicity or the answer simply brings confusion. Going with that theme, some will find this answer woefully wanting, and I apologize if that is the case. However, we can discuss it in more depth through the comments if you like.
The answer to this question is more a function of perspective than anything else. We humans by nature see life as the time between conceptions and death, about 80 years. We usually see birth as good and death as bad. We judge whether something is beneficial or not based on its effects during that time between conception and death. We also look at how things affect us, or other relatively small groups like our family, or a particular community. But what if our perspective changes completely?
When God views us, our lives, and all humanity, he sees us as immortal beings. Forever is a lot more than 80 years. As a matter of fact, in the perspective of forever, life on earth is but the blink of an eye. And if someone is going to live forever, death of this body is simply a temporary transitional formality, like a caterpillar in a cocoon. And while I believe he knows and loves us individually, he also must make decisions that may effect all humanity for all time. That is a lot of people. And if the outcome of this life is forever in heaven or hell, and one of those outcomes applies to everyone who has ever lived and will ever live, then some extreme, relatively short term, sufferings during this life may be the best thing overall.
If at this point you think I am giving God too much of a pass or that you think his decisions are outrageous, consider that we as mere humans make these same decisions all time. Most of us by the time we are in our 40s have seen someone take chemo-therapy. It can be extremely miserable to take but doctors administer it in the hopes that the short term suffering will give the person a longer and better life in the long run. I’ve seen children have a broken bone set that cause excruciating pain that was absolutely necessary. And what about parents who punish their children, whether corporeally or through some restriction of privileges. Are they not making the same decision? Lastly, every general in every war has chosen to send soldiers to their deaths, sometimes thousands of soldiers, for the sake of people he does not even know.
One last consideration. God asked his own son to be brutally and horribly killed on a cross for the sake of others. If you are his follower you must expect that he will be willing to ask you to suffer and/or sacrifice in some way too. Broaden your perspective and try to realize why he may be asking that of you, and then respond just as his son Jesus did.