Why would you think this person was "afflicted"? Because he had gone astray from God's Word!!!What happens when you go astray from God's Word? You wind up giving the devil a place in your life, and he will afflict you whether you want it or not.Great scripture. That really says it all doesn't it....
God is FAITHFUL to afflict us - when need be
Psa 119:67.. Before I was afflicted I went astray, but now I keep your word.
Psa 119:68.. You are good and do good; teach me your statutes.
Psa 119:69.. The insolent smear me with lies, but with my whole heart I keep your precepts;
Psa 119:70.. their heart is unfeeling like fat, but I delight in your law.
Psa 119:71.. It is good for me that I was afflicted, that I might learn your statutes.
Psa 119:72.. The law of your mouth is better to me than thousands of gold and silver pieces.
You do know you can learn some things by your own ways in going astray. When you put your hand in the fire will it not burn you? Did God teach you this? Did you not teach yourself not to do that again?