For hard drugs it can probably help centers do things like safe injection sites. Legalization also means you can regulate. That can help in a lot of ways: making drugs safer, mandating that done portion of proceeds gives towards prevention, etc. Addicts will be less afraid of seeking medical treatment if they know they won't be in legal trouble. (They wouldn't anyway, but I've heard a lot of people are paranoid about this.)
Anyway, I don't have any facts or figures. But it seems reasonable to me that legalization could, in some cases, help.
Substitute "a developer forgot to upload the code to one of the servers" for "the deployment agent errored while downloading the new binary/code onto the server and a bug in the agent prevented the error from being surfaced." Now you have the same failure mode, and the impact happens even faster.
The blame here lies squarely with the developers--the code was written in a non-backwards-compatible way.