In the case of drugs, it is clear that people will use them regardless. So the question for policymakers can't be "how do we stop people using drugs?", it has to be "given that people will use drugs, how do we minimise the harm caused?"
The other interesting parallel is ashtrays in aeroplane toilets. Supposedly they're there because sometimes, despite the warnings and no-smoking signs, people light up in the loo anyway. It's better for them to have an ashtray to put the cigarette out in than to try to improvise and possibly start a fire. In a situation where a planeload of passenger's lives could be at stake, there's no room for moral grandstanding - they've done the pragmatic thing and realised that when total prohibition cannot be enforced, you simply do what you can to minimise the damage.