It decouples the interests of drug traffickers from those of users making users more likely to cooperate with law enforcement, frees up social workers and medical professionals from the risk of criminal liability for associating with drug users in possession of or using drugs. It also makes it easier to address incidental associated health issue such as infections from dirty needles. Treating it as a health issue destigmatises it making it easier for users to talk about it and seek help.
This is not theoretical, this is from actual findings from countries like Portugal the Netherlands and Norway where trading in hard drugs is still illegal but possession and use are treated as public health issues. This is a policy that works.