The concept that we get to take our home legal system waltzing around the world with us as we travel is arrogant. You may be morally and legally free to post a cartoon mocking Mohammed on your Facebook page, but don't be surprised if you get detained on a trip through Saudi Arabia.
At least in the US he's innocent until proven guilty and will probably get a fair trial. And he wasn't arrested for posting his opinions on social media or bashing the president. The software in question was designed to steal people's access to their shopping and banking accounts. And the accusation is he conspired to sell it and offer support to criminals to help them abuse their victims. I would have no problem with an American getting arrested under similar circumstances while visiting another country.