So, if all drugs were legal he would have been out doing charity work instead? Maybe he would - we don't know because they aren't legal. But what we do know is that the War On (some) Drugs, corrupts many people, cops included. The cure is worse than the disease.
No, he was corrupt because he was corrupt. There are legitimate arguments against the WOD, this is not one of them.