I would suggest reading "The New Jim Crow" by Michelle Alexander. In it she describes how the war on drugs (and other tools) fuel the now massive American prison industry. Her thesis is that some white Americans and white elites wanted to have a scapegoat and distraction for social ills. The war on drugs provided this opportunity by blaming black men for societies problems because they were corrupting the youth with crack cocaine, jazz music and reefer, and whenever else they can point to.
Some evidence for this includes Reagan's can for a new drug war happened before any statistical increase in drug use or crime and this was manufactured as a PR stunt. The fact that black and brown individuals are adversely targeted (even though they use drugs at roughly the same rates at whites) shows this is an ingroup vs outgroup mentality.
(I am answering specifically in regards to the United States)
In a word: crime
Retro Report has insightful segments on the heroin and crack "epidemics".
In the 1970s, drugs were seen as the common denominator of ills in large cities. As a result, individual large cities such as New York instituted mandatory minimum sentence laws for various drug charges, and the federal government passed the Anti-Drug Abuse Act of 1986 which instituted, among other things, federal mandatory minimum sentences for drug offences.
President Nixon launched the war on drugs in 1972, largely in response to drug abuse and addiction problems in the military after the Vietnam war. At the onset, however, the emphasis was on treatment, not punishment:
When traffic in narcotics is no longer profitable, then that traffic will cease. Increased enforcement and vigorous application of the fullest penalties provided by law are two of the steps in rendering narcotics trade unprofitable. But as long as there is a demand, there will be those willing to take the risks of meeting the demand. So we must also act to destroy the market for drugs, and this means the prevention of new addicts, and the rehabilitation of those who are addicted.
Politically, being "tough on drugs" was a winner for local politicians. NY Gov. Rockefeller toughened NY's laws, believing that treatment and rehabilitation were not stemming the tide of crime and drug use. As a result, many other large cities toughened their drug laws in response, believing tough enforcement would alleviate drug abuse and deter crime