Research has suggested that compulsive behavior persists because

Others begin to expect it

It reduces anxiety

It diverts the attention of the individual from the problem

There is some underlying conflict