We repeat what is known. Even though we know the behaviour is dysfunctional and not serving us well, we repeat it because it feels familiar and we know what to expect. This is what I refer to as the devil you know, and we frequently choose it over the unknown because it is familiar.
We practise what we were taught as children. Because we learned them when we were vulnerable and our brains weren't fully developed, the beliefs, coping skills, and behaviour patterns that we acquired in childhood become deeply ingrained. Moreover, they are difficult to alter after years of use.