A lot of the Old Testament prophets talk about Israel's unfaithfulness to God. Their punishments and trials come as a consequence to their unrighteous and idolatrous behavior. Most modern folks (or at least westerners) are not real keen on the idea of such punishment. It doesn't fall in line with their understanding of God's love and grace. Again, we're struck by an either/or mentality. Either God is nice or God punishes. Which is it? Somehow we can't get our mind around the notion that God could be both.
After all, parents discipline and punish their children all the time and they love them. It's not either/or. It's both/and. And many would argue that a truly loving parent has to discipline their child--it's the only way to "raise them right." So, why would we think God would be any different? Should God discipline and shape us so that we might be the best person possible?
I'm inclined to think we have to be refined by the fire. We must change our sinful actions to righteous ones. And my guess is, we won't up and change on our own, especially not if everything is peachy and wonderful. It's trials, difficulties, and challenges that force us out of our comfort zone and into something different--ideally something/someone more righteous/faithful/holy.