Imagine that you are not feeling like yourself and after some delay you finally go to the doctor to find out what's wrong. You're given blood tests and the doctor probes and runs other tests to find out what's wrong. A week later you get that dreaded call: "You have stage five cancer...we'll do all we can, but it's not looking good."
You ask how much time you have and when you find out that it's only months to live, you are forced at that time to make a choice. You can either see the beauty of life like never before and choose to live the life you have left to the fullest, or you can throw in the cards and wallow in the despair you'll inevitably feel at this news.
Prison is not always a sentence of death (although for some it is), but when you're sentenced to prison you're also faced with two options: learn to see the beauty in life that before you took for granted, and learn to live life to the fullest, or shrivel up in fear and anger at all you've lost.
You see, either way, whether in the dreaded news from the doctor, or in the sentence from a harsh judge, perspective is what makes all the difference. I have seen men with life sentences who have come to peace with their life and are living life seeing all of the beauty even in this living hell, and I have see others with very short sentences throw away their chance at life and freedom because they never learned to appreciate the beauty that life offers everyone who chooses to see it.
God makes the sun rise on the just and the unjust, and sends rain on those who love Him and those who curse Him to His face. But we have a choice in how we respond to the tragedies of life. We have a choice in whether we see the beauty in God's gifts to us, or simply complain that they aren't what we want, and how we want them. And in that response lies all the difference in the world.