Cannabis was hardly known in the USA in the 1930s, and when alcohol was re-legalised the prohibition agents, who had a vast infrastructure, needed work. Henry Anslinger picked on pot as it was widely used by Mexicans so they would be able to work more freely. Trouble with alcohol prohibition is rich white people, who then and now, have the political power, drink. Mexicans could be "othered".
In the 1970s when it started to be more popular amongst the counter culture types prosecuting pot was a way of beating on the "dirty hippies".
The meme that "drugs are bad" made it into our collective consciousness and we have been trying to root it out (seemingly one funeral at a time).
That is from my memory but my main source for that is "Chasing teh Screem" by Johann Hari