The answer to this question will depend on who is answering.
There are some people who would say that OCD is a punishment from a higher power, and they may suggest some spiritual type of healing as a cure.
Others may say that OCD is the result of what has already been discussed in the book, such as intrusive thoughts, neurochemicals, or even strep throat. Either way, only the research that we have discussed in this book is testable, so we can never answer the question of whether OCD could be a punishment from a higher power because we can never test that.
However, whether OCD is a punishment from a god is not as important as what you are going to do about your OCD. There is a joke about a guy who is in a flood. An evacuation squad pulls up to his door in a truck and tells him he must leave, or he may die in the flood.
He responds, “No, God will save me.” Later, a boat comes up to his window, and the evacuation squad tells him to get in. He replies again, “No, God will save me.” Finally, he is on the roof of his home, surrounded by water, and a helicopter comes along. A ladder is dropped and the evacuation squad tells him to climb the ladder, and he yells, “No, God will save me!” Minutes later, he drowns in the flood.
Upon entering heaven, he demands to talk to God. He is granted his request, and he angrily yells at God, “I prayed and prayed for you to save me, and you let me die!” God looks at him and says, “I sent a truck, a boat, and a helicopter, what more did you want?”
The point is, no matter what the cause, there is treatment available to assist you, you may just need to look for it.