Yet another example of how Divine Command Theory perverts the innate moral compass. Thoughts like that are necessary if you believe that there is a good omni-God and you know that suffering occurs. The skeptic says, I don't know if a god exists that can prevent gratuitous suffering, but such a god would be sadistic if it did. The believer cannot go there, so, he says the suffering must be good and holy, and seeks to explain how. We generally hear either that suffering is a purifying process, or that the suffering was deserved, or that we couldn't know comfort without also knowing suffering, so its actually a helpful lesson. Let's consider each of these:
[1] Is suffering good and holy? They obviously convinced Mother Teresa of that, which is especially unfortunate given that she oversaw a collection of hospices, whose sole function is to provide comfort care and mitigate suffering. It was widely reported that she withheld adequate comfort care from them, undoubtedly because she thought that she was helping them in this way.
I have a background in hospice, where among other things, we study the barriers to giving adequate comfort care, such as regulatory agencies monitoring narcotic prescription and the belief that it is immoral to not do everything possible as long as the patient is still alive - the opposite of the goal in palliative care, which is to do nothing that increases discomfort. But the reason I mention it is that the belief that many religious patients had that they didn't deserve heaven or forgiveness as they were, and needed to undergo some cleansing ordeal that involved severe, prolonged suffering.
[2] Deserved is a good one, appearing in many Bible stories in which people are harmed. If a flood exterminated most most of humanity, it must have deserved it. Sodom and Gomorrah demolished? Must have been sinners.
[3] We have a dog that seems to know no fear. He never flinches or recoils, and never runs from the bottle rocket or thunder. He is happy to see visitors. The point is, he's never known fear. If we're to assume that a good god lets us suffer so that we can see how much better life is when it's over, should I terrify the dog so he knows what it's like to not be terrified (I know your answer - this question is for the person who makes that argument)? If that makes no sense to the apologist (or anybody else), neither does the other argument.