Stanley Rachman and Padmal de Silva's 1978 study compared the intrusive thoughts of patients with obsessive-compulsive disorder to those of a non-clinical group. The content was essentially identical. Almost everyone occasionally has violent, sexual or blasphemous thoughts bearing no relation to what they want or would do.
The difference lies not in the thought but in the reaction to it. Someone who treats it as mental noise lets it pass. Someone who treats it as meaningful — “if I thought that, it says something about me” — begins monitoring it, and the monitoring makes it more frequent.
This is where Daniel Wegner's effect comes in: deliberately trying not to think of something creates a process that continually checks whether the thought is absent — and every check brings it back. It is why “just stop thinking about it” is advice that guarantees the opposite.
What helps is changing the relationship to the thought, not removing it. Cognitive behavioural therapy works on the interpretation; acceptance-based approaches work on the capacity to observe it without struggling.