The US Supreme Court recognizes a general principle that you can transit a State with things that are illegal in that State. An individual State cannot impose a de facto ban on commerce between States, which includes the right to transport goods through a State in the normal fashion regardless of the laws of that State.
The court viewed this as unconstitutional interference in the commerce between the origin and destination States, which seems correct on its face. There must be evidence of intent to distribute the firearms in the State where they are illegal. This case created a safe harbor for mere transport of goods between States.
Cannabis is different because it violates Federal law. It is technically illegal everywhere even though it is legal under State law in many locales. The Federal government has chosen to not enforce this law in States where it is legal, largely because enforcement could create a Constitutional case that could bring into question Federal authority to enact those and many other laws.
Again, that's just a personal opinion. I could have that opinion about any number of laws and choose to disobey them because of that.
You're certainly entitled to the opinion that the law is indefensible and should never be followed. It's just weird to me for you to treat this like some sort of obvious objective view with no reasonable grounds for disagreement.