There is a section in 2 Corinthians chapter 12 where the apostle Paul discusses a problem he had and relates it to a thorn. This helped a lot to understand my OCD and God's reasoning for giving people certain problems:
PAUL'S THORN (2 Corinthians 12:7-10)
" 7To keep me from becoming conceited because of these surpassingly great revelations, there was given me a thorn in my flesh, a messenger of Satan, to torment me. 8Three times I pleaded with the Lord to take it away from me. 9But he said to me, "My grace is sufficient for you, for my power is made perfect in weakness." Therefore I will boast all the more gladly about my weaknesses, so that Christ's power may rest on me. 10That is why, for Christ's sake, I delight in weaknesses, in insults, in hardships, in persecutions, in difficulties. For when I am weak, then I am strong. "
PAUL'S THORN (2 Corinthians 12:7-10)
" 7To keep me from becoming conceited because of these surpassingly great revelations, there was given me a thorn in my flesh, a messenger of Satan, to torment me. 8Three times I pleaded with the Lord to take it away from me. 9But he said to me, "My grace is sufficient for you, for my power is made perfect in weakness." Therefore I will boast all the more gladly about my weaknesses, so that Christ's power may rest on me. 10That is why, for Christ's sake, I delight in weaknesses, in insults, in hardships, in persecutions, in difficulties. For when I am weak, then I am strong. "