Operant conditioning
https://en.wikipedia.org/wiki/Operant_conditioning
There are also lots of studies indicating that the speed of action of a drug is important for addiction. Which essentially boils down to the fact that the brain (beeing effected by operant conditioning) needs a drug response that is sufficiently noticeable to be connected to the action of taking the drug.