There is an analogy that I like to use when it comes to deporting people who are not in the country legally.
Imagine a man steals a minivan from a neighbor. He and his family use it for years, to go shopping, take the kids to school and soccer practice, go to medical appointments, and so on.
He is discovered. Taking the minivan back and giving it to its rightful owner is not punishment. Neither would it be punishment to fine him for the depreciation of the vehicle. That would merely be returning things to the state they were before the crime was committed. Sending him to jail would be his punishment.
And so it is that when someone comes here illegally, sending him back to the shit-hole from whence he came would not be punishment, merely restoring things to the state they were in before the crime was committed. Punishment is another matter altogether.