As explained in Business Law 101 years ago:
A law cannot invalidate a pre-existing contract. Not even a Federal law. The only way the gov’t can cancel private contracts is by finding something in the Constitution (or ratified Treaty, which trump the Constitution.
There were thousands and thousands of contracts for the manufacture, transpotation and distribution of alcohol.
Since they couldn’t find anything in the Constitution to invoke, they put something in it they could use.
It would have been interesting if someone had made up a contract for the supply of a newly-found drug - marijuana in the 20’s, LSD in the 50’s, I don’t know if the newer recreational drugs are legitimate drugs or require the use of illegal chemistry.
You young-uns be sure to get a contract up before the next fun drug gets outlawed.