“The labels “good habit” and “bad habit” are slightly inaccurate. There are no good habits or bad habits. There are only effective habits. That is, effective at solving problems. All habits serve you in some way—even the bad ones—which is why you repeat them.”James Clear, Atomic Habits
The point on effective habits reminds me of a similar idea from NLP (Neuro Linguistic Programming), that everything we do we do for a positive reason. It might not make sense to anyone else. But we don’t tend to deliberately do things that harm us.
The example that stuck in my mind from the NLP book was smoking. Smoking is bad for your health, yes. Yet it can also be a way to fit in with a group, or to deal with anxiety, or many other reasons. To the person who smokes, they are doing it for a good reason to them. Not to us. To them.
If they do want to quit, it is important to understand what need smoking meets. Then to talk to that need and how it can be met by other positive behaviours.