It's a matter of learning to find cause and effect and to take responsibility for your own life and decisions.
I met with a client yesterday. She kicked her son out of her house on Christmas Eve. The story she told was incredibly sad, but I could see the march of bad decisions compounded one after another in her son's life pretty clearly. I'm sure he's convinced that he has been dealt an unfair hand while in truth he is just seeing the natural consequences of his own priorities. It's truly sad. Mom spent $300,000 to give him a start in life and he's squandered it, I never would have been as patient as she was.
That said, I do think that the Lord knows how to use bad things to help us grow, if we will allow it. I think that is what the phrase really means.