The precedent was Wickard v Filburn. And it was an absolute piece of crap.
Wickard v. Filburn at least involved a product actually traded between the States, although it certainly laid the foundation for Gonzales v. Raich.
But the real point is this: Americans are children, incapable of consistent thought. If we like the law, then we say Congress has the power. If we don’t, they we say Congress doesn’t. Principals? None in sight.