Unfortunately, I believe that the latter is directly the result of the former, his protestations of ignorance notwithstanding...
I am certain that he didn't fill in the form because he was afraid they would find out he was illegal (which I'm also sure they would have, nobody leaves with that much cash without being detained).
I think he didn't understand the consequences of that act.
It's not punishment, of course. Because if it is, it's unfairly administered, since the "punishment" for the same crime is based on how much money you have.
It's not even being treated as a crime, more like a "you didn't write down any money, so you must not have had any, so we'll take it all from you, good day."