Answer:
Sam is experiecing OCD (Obsessive-Compulsive Disorder)
Explanation:
OCD is an anxiety disorder, well known for its repetitive behaviors, where you cannot control yourself from doing. Even if you have consciousness of how irritating and unracional your behaviors are, when you have OCD you cannot stop them and you won't relax until you finished doing all your ritual.