The case the Supremes relied on to uphold federal marijuana regulation was a New Deal Era case where the Supreme Court ruled the government could tell a farmer that he could not grow wheat on his own land for his own personal consumption because that was somehow “interstate commerce.” Ridiculous.
https://www.law.cornell.edu/supct/html/03-1454.ZS.html/
Of particular relevance here is Wickard v. Filburn, 317 U.S. 111, 127128, where, in rejecting the appellee farmers contention that Congress admitted power to regulate the production of wheat for commerce did not authorize federal regulation of wheat production intended wholly for the appellees own consumption, the Court established that Congress can regulate purely intrastate activity that is not itself commercial, i.e., not produced for sale, if it concludes that failure to regulate that class of activity would undercut the regulation of the interstate market in that commodity. The similarities between this case and Wickard are striking. In both cases, the regulation is squarely within Congress commerce power because production of the commodity meant for home consumption, be it wheat or marijuana, has a substantial effect on supply and demand in the national market for that commodity. In assessing the scope of Congress Commerce Clause authority, the Court need not determine whether respondents activities, taken in the aggregate, substantially affect interstate commerce in fact, but only whether a rational basis exists for so concluding. E.g., Lopez, 514 U.S., at 557. Given the enforcement difficulties that attend distinguishing between marijuana cultivated locally and marijuana grown elsewhere, 21 U.S.C. § 801(5), and concerns about diversion into illicit channels, the Court has no difficulty concluding that Congress had a rational basis for believing that failure to regulate the intrastate manufacture and possession of marijuana would leave a gaping hole in the CSA. Pp. 1220.