Some habits are extremely beneficial; the ones that you go through as part of your morning routine before work are a good example of this. Other habits activate the pleasure centres in our brains, triggering the release of a feel good chemical called dopamine.
It doesn’t distinguish whether the habit itself is good for us, and repeating habits that release dopamine ultimately changes the way our brains work. That’s why addiction has come to be classified as a disorder or a disease, rather than a flaw in a person’s character. Knowing that the habit isn’t good for you doesn’t keep your brain from wanting you to keep it up.