Not if the captain's a PC, he doesn't. And only a bad Ref would play all NPCs the same.
The Ref Enforces it via the use of NPC's. The Noble who quietly accepts the imposition, verifies the Captain's having seized non-nobles weapons, then has the Captain arrested for unlawful seizure at the next port. The passenger who is an imperial compliance officer in mufti, who yanks the captain's master's permit at the end of the trip. The Broker who points out that he won't let you have passengers because you don't obey their rights. The DM imposed negative DM's for not adhering to the rules. The resultant missing of a payment and the DM hitting the PC's with skipjacks and bounty hunters.
Lots of great ways to pressure a PC for compliance. Things beow the resolution of the rules, but within the spirit (and letter) of CT...
The Captain who disarms all passengers totally, the GM has lots of recourse. Varying from nuisance (No Weapons generates Passenger DM-1 per die if LL of source or destination system less than 6), to megathump (Arrest and incarceration for violation of civil rights under imperial law; break out AM8).
The rules for ships encode a lot of laws, laws which you, as a european, probably think needlessly old fashioned, but laws which, really, are more proof of "Yanks-in-space" model; in the 1970's, one could fly with pocket knives within the US. I did so. Even in the 1980's. The expectation of checking anything bigger than a utility knife was the 1970's standard for travel... and it got coded into Traveller's DNA from the US's.
Enforcement is, however, in CT at least, explicitly the GM's call.