Obsessive-compulsive behaviour can arise from blows to the head, Parkinson's disease, viruses that attack the brain, epileptic seizures or strokes.