Having watched a video of various abnormal movements sometime in the past two years, I recall hearing that sufferers of Tourette's syndrome describe their swearing and abnormal movements as analogous to scratching an itch.

The urge to do these things increases in them, like an itch does, and they can consciously suppress the movement or swearing until it becomes unbearable, at which point they do it, and it gives them relief.