Important to note here that the he has not been charged with a crime.
If a legal resident commits a crime there is a process to detain, try, sentence, and (potentially) deport them. It happens all the time. But that is not what is happening here. They arrested and detained an American without due process.
I did specify that he is a legal resident and not a citizen.