In our world it's easy to fall into drugs, first because of the stress you're under: there are times in which you get high to deal with the shifts because after confronting criminals in a gunfight or seeing it up close, you're in shock.
No doubt being a cop in DF is an extremely stressful job, but this is a poor excuse as well as a poor explanation. I very much doubt that all of the 3,500 drug using cops in Mexico City do so only after gunfights, and Mexico can't wait for the job to become less stressful before demanding cleaner police officers. Though assuming stress is indeed a major factor, perhaps Mexico's police departments can seek more therapeutic ways to help cops unwind. Any such effort should be coupled with other measures to tamp down on drug use among police, such as increased training and filters for new cadets, more supervision, drug tests, et cetera.