People traveling abroad need to realize that they are not only subject to US law, they are also under local law. I always taught my children "if you don't want to do the time, don't do the crime".
The sentence is harsh by any civilized country's standards, but he wasn't traveling in a civilized country. He is an American, in a country that hates Americans, stealing a government banner from a government owned hotel, what does he expect? My prayer is that he will be released soon.