Basically, marijuana was legal, but you were required to purchase a tax stamp (that was never issued) in order to prove that you had paid taxes on it.
There were many reasons for this, but one factor was that, at the time, the prevailing thought was that Congress did not have the authority to ban the possession of a substance outright within the states. (Even the 18th Amendment was actually carefully worded in a way such that it didn't technically prohibit all possession and sale of alcohol, the way people oftentimes think).
This (tax law) is also the same technique that the Obama administration has used to crack down on legal medical marijuana dispensaries, while still paying lip service to his promise not to[1].
(In the latter case, the tax laws are written in such a way that medical marijuana dispensaries are unable to deduct for normal business expenses that other businesses would be).
Al Capone was also convicted of tax evasion[2], as was Reuben Sturman[3]. Tax law can be used as a "politically correct" excuse to criminalize behavior that otherwise would be politically impossible to criminalize.
[1] http://www.huffingtonpost.com/2011/10/04/harborside-health-c...