I was a huge sugar fiend as a child, I was in my 20s by the time I really cut down on it. When I was 25 it was weed, then spice, then weed again. I've been a smoker since I was 18. My mom was always deathly afraid of me becoming an alcoholic because her maternal grandfather was one, but that habit always broke itself (hangovers are the worst).
AspE's brief summary makes the most sense. Outside of sugar, I picked up those habits as a coping mechanism, and for a time, it was easier to put on an upbeat social face knowing I could wipe the inner turmoil clean with weed and nicotine.
I took one of those ancestry tests recently, part of the additional information was that I had an affinity towards sweet foods, and very little towards umami (I never had much enthusiasm for meaty dishes).
Having aspergers is a different machine from addiction, I want consistency and reliability in my life, I feel right when I follow a routine (pretty sure we all do). That routine can be drugs, or something that replaces them, the change doesn't come easy, but as long as I'm in a routine I can adapt to the new normal and be a happy camper.
_________________
I'm a math evangelist, I believe in theorems and ignore the proofs.