Once someone is HIV positive, that person can give up injecting drugs, but the deadly virus is still there. But that is not the approach our society usually takes toward those engaged in life-threatening activities. For example, we have lifeguards at the shore to save the lives of those who swim out too far. We send rescuers for skiers and climbers who have foolishly gone to dangerous areas and injured themselves. As a society, we try hard to prevent serious injury and death even to people who are very incautious.
Drug use is illegal.
It is a question of having the punishment fit the crime. Under state laws, we punish drug possession by probation, by commitment to treatment, and by prison sentences from a few months to several years. Not one of our 50 states executes people for the crime of drug possession. Drug use is like slavery. Consider the difference that access to sterile needles makes.