A major part of the problem: in many places, getting caught by the cops while carrying syringes will get you charged with “possession of drug paraphernalia”.
Another part of the problem: anti-junkie defensive architecture (inaccessible toilets, UV lighting, etc) that forces IVDUs into public drug consumption.