We eat high calorie foods because our brain tells us its good even though we're a little fat. We fuck each other because our brain tells us its good, while we use contraceptives. We go out and try to be successful because our brain tells us it's good even though our base needs are already provided for.
Sure you can say that we're tricking our brain, but only so far as you can say everything we've done since we discovered conscious thought and developed agency is tricking the brain. Hence why I find pointing it out in a specific case a little silly. "Hey you're only doing that because it feels good!" Well yeah duh? Same reason any of us are doing anything.
Most people who use heroin do not become addicted. The addiction rate for heroin is 23% according to National Institute on Drug Abuse [1]. Note that this is overall addiction rate, not the percentage of heroin users that are addicted, as most heroin addicts do not remain addicted.
In other words: The value of heroin for most users is the high, not that it satisfies an addiction.