This isn't the case with marijuana. No conclusion has been reached that it is "wrongfully illegal," it's just not something we want to continue prosecuting for.
This does not excuse the actions of those currently in prison for drug offenses-- we aren't punishing them because marijuana is/was illegal, we're punishing them because they decided they didn't have to abide by the law at the time it existed.