People need in this life God's direction to live a balanced and purposeful life and when this does not happen there is much imbalance and disappointments in life and it is not that when we address with God there are no disappointments if there are but God helps us to rest in Him in the midst of any affliction.
David in this psalm teaches us the way to correct the man God uses to correct him in his law
Psalm 94: 12-13
12 Blessed is the man whom you, JAH, correct,
And in your law you instruct it,
13 To make him rest on the days of affliction,
While the hole is dug for the wicked.
The Bible teaches us and through this psalm we can corroborate it that the wise receive with joy and gratitude the divine discipline is to say that his time is dedicated to receiving God's teachings in obedience.
Blessed is all that God corrects in his law and obviously receives it with gratitude to live a fair and balanced life and not waste his time on things that do not edify
This correction really is received by someone truly wise who has understood that only through the word of God can he find rest and purpose in his life.
God corrects us so that we receive that correction and on the bad day he can help us, because we could never avoid a bad day but what we can avoid is hopeless affliction since He tells us that he gives us the tools through his word to May we be calm in the midst of affliction and even have peace.
So all those who allow themselves to be corrected by God to live a life with purpose and firmness in the face of adversity are blessed.