The context suggests that the ‘resisting arrest’ school of making things up probably isn’t at play.
That one’s natural environment seems to be post-hoc justification of unreasonable escalation on the cops’ part: if they flip out and decide to pick someone to turn into a police matter they have a strong incentive to find something that justifies doing so.
In the case of customs officers, unlike police officers, every customs declaration is a customs matter by default(albeit normally a super boring one); so casting around for some justification wouldn’t really be a factor unless they unreasonably escalate(and, if they decide to rip someone’s luggage to shreds or haul them off to one of the side rooms for hours of aggressive questioning I assume that they do have a strong interest in returning with a story of guilt, or at least plausible suspicion; for the same reasons as the cops in the ‘resisting arrest’ scenario); and pointing out that someone’s hand luggage directly contradicts their declaration isn’t really an escalation.
The customs case seems a lot more closely analogous to that of cops doing traffic enforcement; where it’s less about needing to fabricate crimes and more about the amount of discretion available to someone who can decide to let it slide, confiscate but agree that you clearly just made a good-faith error in the paperwork, or work from the assumption that you are a trade compliance expert steeped in deceit and count all discrepancies as malicious.