Such intrusive thoughts are generally viewed as a kind of obsessive compulsive disorder, with anxiety manifesting not as repetitive behaviors but as repetitive thoughts. Some people have violent intrusions, some sexual, some disgusting, some religious or immoral. They don’t want to do the things they think about; on the contrary, their distress comes from the very fact that they absolutely do not want to do these things, and they’re worried that they might or that the thoughts mean that some hidden, awful part of them does want to.