All good points but in one case it is a person placing harm on another, in the case of drug addiction it is a person harming themselves, the harm to others comes when they rob or commit various crimes to get money for thier stuff. If a person is only harming themselves and will continue to do so until they succumb to the addiction, by giving them the carrot and the stick of access to the drug coupled with counseling to get to the root of thier problem you eliminate most of the harm to society that comes from drug addiction that people are gonna continue to do whether it's legal or not.
I'm not saying legalize heroin in the way that alcohol is legal, way more harm comes to society from alcohol than any other drug anyway, whether car accidents that kill people, domestic violence issues, decisions made while drunk that end in prison terms for people, but it still comes down to most people who use thier drug of choice are using it as an escape route from reality because there is something in thier reality causing them pain, find out what the thorn in the side is through counseling, deal with it, and you've gone a long way in treating the cause and not just punishing the effects.