Repetition can be useful if you're trying to memorize a poem, master a guitar riff, or just cultivate good habits. When this kind of behavior becomes compulsive, however, it can get in the way of normal life–an impediment sometimes observed in psychiatric illnesses like Tourette's syndrom …
See the article here:
Research on repetitive worm behavior may have implications for understanding human disease