They're a relatively gun-free country and want to keep it that way. They have no idea if he was bringing it in to sell to somebody, or as part of some other operation. Him telling them that it was a mistake could be a lie for all they know. The rules are the rules, and they're there for a reason. They are a deterrent and a blanket policy like that works. If you're a bad guy, are you gonna risk it when even the "good guys" go to jail? I feel bad that he'll miss his kids growing up, but you have to take responsibility for your actions and know the rules where you're going.
Like when Brittany Griner went to jail in Russia. Yes, I'm sure they treated her worse because she was a famous American, but the fact is she still brought weed into a country that prohibits that. She made it easy for them to put her in jail. Had she not had the weed, she'd probably have been fine.