IIRC, Nixon even explicitly stated that the controlled substances act was designed to target voter groups that threatened the Republican party of the time (the black community and the anti-war crowd both being the biggest users of cannabis). Now, I think it largely exists as a method of continuing a very profitable private prison system and as a means of justification for padding police budgets and maintaining the DEA in perpetuity. Hence the head-scratchingly stupid decision to keep marijuana as a schedule I controlled substance despite many proven medical benefits to epilepsy sufferers (among many others).
The top five contributors to political groups designed to keep weed illegal are pharmaceuticals, police unions, alcohol and tobacco companies, private prison lobbies, and prison guard lobbies. That should be a tip-off to who has the most to gain by its illegality. While it is a powerful political coalition, they're slowly getting chipped away at. Especially in light of the success and profitability of recreational marijuana states.
If the rationale for current drug laws were for public well-being, the illegality of alcohol would be much more prudent.