Before I was afflicted I went astray: but now have I kept thy word. ~Psalm 119:67
The psalmist here makes it real clear. Trials are form of discipline. We often struggle with wanting to please God, but still doing things our own way. Therefore our Father has to discipline us to get us back on track. Nobody likes trials, but they are usually the most beneficial times in the life of a true Christian. They show us who we really are.
A few verses later the psalmist says it is good that he has been afflicted. Why? So that he study God’s word more (Psalm 119:71). Most of us would never choose a bad situation if it was up to us. However, if we are honest with ourselves we realize those are the times where we come to experience God more and more and more. This is when we understand that we can not depend on anyone else, so we must study, pray, and seek God’s holy will like never before. Anyone who hasn’t realized that is probably going through the same trial over and over again. Don’t get discouraged in a trial. God may be allowing you to be broken down, but only so that He can build you up to what He knows you are supposed to be!