A study by the University of Montreal found compulsive habits are often carried out by people who get bored or frustrated easily, reports TheHuffington Post. The cause of this? Perfectionism.

"We believe that individuals with these repetitive behaviors may be perfectionistic, meaning that they are unable to relax and to perform task at a 'normal' pace," Dr. Kieron O'Connor, professor of psychiatry at the university and the study's lead author, explained in a press release. "They are therefore prone to frustration, impatience, and dissatisfaction when they do not reach their goals. They also experience greater levels of boredom."

Researchers worked with a test group to monitor how those with a history of compulsive behaviours responded to situations designed to trigger particular feelings. The results found they were more likely to chomp on their nails when feeling stressed and disinterested than when they were relaxed.

So, when perfectionists don't reach their goals, they need a new task to focus on, like chomping on their nails. And it's not necessarily a bad thing.

"The positive effects of the habits are stimulation and a (maladaptive) way of regulating emotion," O'Connor told The Huffington Post. "What triggers the habit is largely frustration and impatience so the action substitutes for more constructive action."