Afflictions teach us to bend our knees, to cry out to the Lord in all our problems and troubles.
"I know, O Lord, that Your judgments are right, and that in faithfulness You have afflicted me" (Psalm 119:75). David is saying, "Lord, I know why You afflicted me. You saw that when all was going well, I went astray, becoming careless, so you allowed trouble to come upon me. You knew it would drive me to my knees and bring me back to brokenness. My affliction was evidence of Your faithfulness to me!"
I know many people who have had to battle awful bondages in their lives—drugs, alcohol, cigarettes—and temptation rages every day. Yet I say to all such people: God cares. He knows the misery you go through and He alone has the power to deliver you.
The Lord does not constantly hover over you, saying, "You're miserable because of what you did. You failed Me and now you're paying the price." No! You do not serve such a God, you serve a loving Father who feels your grief the moment you first feel it. No matter how you got into your affliction, God hurts with you and He wants to deliver you.
You may think God is not helping you at all, but the very moment He heard your cry, He went into action. Let me prove it to you:
"So God heard their groaning, and God remembered His covenant with Abraham, with Isaac, and with Jacob. And God looked upon the children of Israel, and God acknowledged them" (Exodus 2:24-25). The word acknowledged here means, "He began to act." God heard their cry and began taking action on their behalf.
"The righteous cry out, and the Lord hears, and delivers them out of all their troubles." (Psalm 34:17). Whenever you fall on your knees, God immediately goes to work on your behalf.