Before I was afflicted I went astray, but now I keep your word.  It is good for me that I was afflicted, that I might learn your statutes.  I know, O LORD, that your rules are righteous, and that in faithfulness you have afflicted me. (ESV)
Psalm 119 is a 176-verse ode to the wondrous goodness of God’s law that I used to find quite confusing. The psalmist goes on and on and on about the goodness of the law. I could understand an ode to God’s mercy, kindness, and love, but why an ode to this restrictive set of rules that God handed down to Israel? I came to realize (mostly through breaking many of these rules and the disaster that ensued) that the law is actually an immense blessing, a guide to the best possible outcome for God’s people. Obeying God’s law is like putting water in a fishbowl or premium gasoline in a Ferrari. It ensures that we get exactly what we were made for. And for this reason, God’s restrictive law is actually wonderful. It provides the exact set of restrictions that make us most alive, most free.
In the heart of Psalm 119, the psalmist takes a moment to acknowledge the goodness of the means by which God caused him to delight in the law: affliction. He actually says that it is good that he was afflicted (v.71) and that affliction is a sign of God’s faithfulness (v. 75) since affliction ultimately makes us turn to His Word (v. 67).
Affliction can be truly horrible and sad, but the immense good that can come from it is that when we are afflicted, we may more than ever before look outside ourselves for help, for life. In the midst of affliction, I may realize that I am not a self-contained life source with answers to all of life’s mysteries. I may look to God and His ways instead. I may find that while I have been charting my own course through this mysterious and perilous world, God has all along revealed the exact way to go.
We cannot possibly know all the reasons that God allows affliction into our lives. Some is self-imposed (the consequences of our own sin) and some is the result of living in a world broken by sin (a sickness or loss). When afflicted, however, there is one sure response: move toward God. Follow Him and His ways. He has proven His trustworthiness by becoming a man and dying to bring you to Himself.
We live in a time of immense uncertainty in which many face severe afflictions of various kinds. When we are unsure of how to respond and what to do, we should do what God says to do: run to Him, worship Him, love your neighbor, remember Him in all your ways. You can even thank Him for afflicting you. As you do so, you will not gain all the answers, but you can be assured that you are living life as it was meant to be lived. That is the blessing of the law.