Let me clear up some points...
First, even if one guy buys a few knifes or a 3ft Katana he will never manage to board the plane with it, as he has to go through a security check before, not to mention the Federal Police agent (border police) on the passport control before the metal detector/x-ray machine.
As per being a psycho toolkit we are peaceful and I can hardly imagine a fellow countryman going into a McDonnalds and slice the manager into BigMac hamburgers or shoot 20 people to death..Ok, we have some civil war atmosphere (more in Rio than here in SAO), and lot's of criminal concerns but, this kind of social misbehaviour (psychos) are very seldom seen here, although it already happened once.
Upon arrival not all luggage is x-ray checked, and the main purpouse of the check is to see if the passengers aren't smuggling stuff into the country(weapons included). This applies specially to the locals as we have a 500 us$ duty free import limit. Most of the checks are "random", not really so..Actually..the customs folks know by sight who they must or must not stop.
And 747-451.. locked or unlocked you should never place preciou goods in bags regardless where you're flying.. If I'm not mistaken, wasn't it at MIA where a bag theft mafia was very active a few years ago?
"ad astra per aspera"