This is the last of the verses in Psalm 119 dealing with the Affects of Affliction on a believer's life. This verse makes clear that God Himself designed affliction because of His faithfulness! He purposely brought affliction on a believer to show His love for them and His desire to see them turn away from sin and turn to His Word to learn how He wants them to live a righteous life.
God is always faithful. You might say, "God is faithful - All the time," and, "All the time - God is faithful." He is faithful to Himself, He cannot deny Himself, 2 Timothy 2:13. He is faithful to His Word, He will not go against what He said, Hebrews 10:23. And, He is faithful to His children. They can always count on Him, Psalm 89:1.
The next time you face affliction in whatever form it may come, recognize the value of it in your life. It turns you away from evil; it encourages you to learn God's statutes; and it reminds you that your God is faithful - All the time!