Habitual patterns of behaviour that don’t serve us well but are difficult to change are a common issue in therapy. In extreme form they can have an obsessive compulsive aspect or manifest as an addiction.
A workbook* for overcoming obsessions and compulsions, makes it clear that avoidance is a key component of OCD behaviour. The understanding is that the obsessive compulsive behaviour is an attempt to create a sense of security, albeit temporary and illusory. Underpinning this type of behaviour is an avoidance of the fear or anxiety that would arise if the compulsion was resisted. Moreover there may well be other feelings, perhaps out of conscious awareness, that might surface if the habitual pattern is confronted.