The classic problematic rationale, that the court discusses in cases like Printz [1] is also dislocation of the political costs of enforcement away from federal officials onto state officials.
2. Enforcing it at the federal level costs money. It's easier to pass a ban where you force the states to pay the costs.
In addition, the Ninth Circuit has held that Congress has Commerce Clause authority to criminalize possession of homemade machine guns.
Congress has chosen to allow states to regulate gambling to a certain extent, which explains its legality in various forms in the various states.
To transfer enforcement costs, including for hosting civil actions outside of the situations where state law claims get into federal court, to state law enforcement and courts.