It is good for me that I was afflicted, That I may learn Your statutes.
NASB95
It is good for me that I was afflicted, that I might learn your statutes.
ESV
It is good for me that I have been afflicted; that I might learn thy statutes.
KJV

If I mark in myself any difference from the ungodly—if I can feel that my natural insensibility is yielding to the influence of grace—if I am enabled to "delight in God's law," which before I had neglected as a "strange thing," if this softening transformation has been wrought in the school of affliction; let me thankfully acknowledge—It is good for me that I have been afflicted. None indeed but the Lord's scholars can know the benefit of this school and this teaching. The first lessons are usually learned under the power of the word pricking and piercing the heart; yet issuing in joyous good. All special lessons afterward will probably be learned here. 'I never'—said Luther—'knew the meaning of God's word, until I came into affliction. I have always found it one of my best schoolmasters.' This teaching distinguishes the sanctified from the unsanctified cross, explaining many a hard text, and sealing many a precious promise—the rod expounding the word, and the Divine Teacher effectually applying both.

Indeed, but for this discipline we should miss much of the meaning and spiritual blessing of the word. For how can we have any experimental acquaintance with the promises of God, except under those circumstances for which the promises are made? When, for example, but in the day of trouble, could we understand the full mercy of such a gracious word, as, "Call upon Me in the day of trouble: I will deliver you, and you shall glorify Me?" And how much more profitable is this experimental learning than mere human instruction! When, therefore, we pray for a clearer apprehension and interest in the blessed book, and for a deeper experience of its power upon our hearts; we are, in fact, often unconsciously supplicating for the chastening rod of our Father's love. For it is the man "whom the Lord chastens," that He "teaches out of His law." Peter, indeed, when on the mount of transfiguration, said, "It is good for us to be here. Let us build here three tabernacles." Here let us abide, in a state of comfort, indulgence, and sunshine. But well was it added by the sacred historian, "Not knowing what he said." The judgment of David was far more correct, when he pronounced, that it was good for him that he had been afflicted. For so often are we convicted of inattention to the voice of the Lord—so often do we find ourselves looking back upon forsaken Sodom, or lingering in the plain, instead of pressing onward to Zoar, that the indulgence of our own liberty would shortly hurry us along the pathway of destruction. Alas! often do we feel the spirit of prayer to be quenched for a season by "a heart overcharged with the cares of this life"—or by the overprizing of some lawful comfort—or by a temper inconsistent with our Christian profession—or by an undue confidence in the flesh. And at such seasons of backsliding, we must count among our choicest mercies the gracious discipline, by which the Lord schools us with the cross, that we may learn His statutes.

After all, however, this must be a paradox to the unenlightened man. He can only "count it" all grief—not "all joy—when he falls into diverse temptations." His testimony is—It is evil—not it is good—for me that I have been afflicted. And even God's children, as we have before remarked, do not always take up this word while smarting under the rod. The common picture of happiness is freedom from trouble, not, as Scripture describes it, the portion of trouble. Yet how true is God's judgment, when it is the very end of affliction to remove the source of all trouble, and consequently to secure—not to destroy—solid happiness! We must however determine the standard of real good by its opposition—not its accordance—to our own fancy or indulgence. The promise of "every good thing" may be fulfilled by a plentiful cup of affliction. Present evil may be "working together for" ultimate "good." Let God take His own way with us. Let us interpret His providences by His covenant—His means by His end—and instead of fainting under the sharpness of His rod, we shall earnestly desire the improvement of it.

Are you, then, tried believer, disposed to regret the lessons you have already learned in this school? Or have you purchased them at too dear a cost? Do you grieve over the bleedings of a contrite heart, that have brought you under the care of the healing physician? Or could you by any other way have obtained so rich a knowledge of His love, or have been trained to such implicit obedience to His will? As Jesus, "though He were a Son, yet learned He obedience by the things which He suffered;" so may we "rejoice, inasmuch as we are partakers of His sufferings," and be thankful to learn the same obedience, as the evidence and fruit of our conformity to Him.

The Lord save us from the greatest of all afflictions, an affliction lost! "Be instructed, O Jerusalem, lest My soul depart from you; lest I make you desolate, a land not inhabited." "He who being often reproved, hardens his neck, shall suddenly be destroyed, and that without remedy." A call to tremble and repent, to watch and pray, and "turn to Him that smites us!"

Oh! is there one of that countless throng surrounding the everlasting throne, who has not sung, "It is good for me that I have been afflicted?" "And one of the elders answered, saying unto me, What are these which are arrayed in white robes? and whence came they? And I said unto him, Sir, you know. And he said unto me, These are they which came out of great tribulation, and have washed their robes, and made them white in the blood of the Lamb."

"It is good for me that I have been afflicted." Even though the affliction came from bad men, it was over-ruled for good ends; though it was bad as it came from them, it was good for David. It benefitted him in many ways, and he knew it Whatever he may have thought while under the trial, he perceived himself to be the better for it when it was over. It was not good to the proud to be prosperous, for their hearts grew sensual and insensible; but affliction was good for the Psalmist Our worst is better for us than the sinner's best. It is bad for sinners to rejoice, and good for saints to sorrow. A thousand benefits have come to us through our pains and griefs, and among the rest is this—that we have thus been schooled in the law.

"That I might learn your statutes." These we have come to know and to keep by feeling the smart of the rod. We prayed the Lord to teach us (66), and now we see how he has already been doing it. Truly he has dealt well with us, for he has dealt wisely with us. We have been kept from the ignorance of the greasy-hearted by our trials, and this, if there were nothing else, is just cause for constant gratitude. To be larded by prosperity is not good for the proud; but for the truth to be learned by adversity is good for the humble. Very little is to be learned without affliction. If we would be scholars we must be sufferers. As the Latins say, experience teaches. There is no royal road to learning the royal statutes; God's commands are best read by eyes wet with tears.