Why do countries ban people from re-entering the country after deportation?

My friend is banned for life from the UAE for supposedly committing a homosexual act, but they let him off the hook and sent him back to the US but was issued a lifetime ban from re-entering. Kind of BS considering he didn’t actually do anything and was living and working their legally.
12 answers 12