Research has suggested that compulsive behavior persists because

It diverts the attention of the individual from the problem

It reduces anxiety

Others begin to expect it

There is some underlying conflict