it absolutely is a habit, the fact that it affects you physiologically via pharma does not make it not a habit. a habit is something you do habitually, that is the exact definition of the word, and the reasons people do them vary wildly. I used heroin as an an extreme example.
Going for a 5k jog every morning is also a habit that affects your brain chemistry, through different mechanisms, and can also be addictive. It's obviously much healthier, but its still a habit, that is reinforced via brain chemistry rewards etc (addictive in some people). It's not as widely seen or known but there is a small cohort of people who exercise becomes a problematic habit and ends up being detrimental to their health.
I suggest you check the definition of the words. I specifically wasn't talking about addiction because that is just one axis of what can make up a habit. Drinking water is a habit that is not addictive but pretty hard to quit. If you take a wider view there are tons of habits that are either harmful or positive, but have no addictive component, and have no chemical component, and are either hard or easy to pickup / drop.
> habit is something you do habitually, that is the exact definition of the word
That definition is too broad to be useful is absolutely not a definition used in the given context (psychology).
Same goes for the examples, you can generalize statements to to get common denominators (affects the brain), but it's not useful to do so, it's misleading.
> it absolutely is a habit
You can follow the definition that you like, but the typical habit is something you just do without thinking. Taking drugs is mostly something you do to get the kick and in later stages because you don't want the withdrawal symptoms. Some addictions are quite habitual too (smoking is not just for the nicotin but also having the habit of taking a break for 10 minutes out on the balcony), but arguably there is more to an addiction than the habit component which is only a minor contributor if at all.
Merriam-Webster does of course have addiction as a habit, but it singles it out as being different than other definitions https://www.merriam-webster.com/dictionary/habit
perhaps this is one of those definitions that are in flux and we are moving from taking drugs as a habit, to first having a drug habit, and soon, no longer a habit but an addiction.
I would have to say that in light of the other definitions of habit it does seem reasonable to separate them.