Permanent banning and deportation isn't punishment, it's the opposite of punishment, it's a slap on the wrist and sending a law breaker away to their freedom somewhere else. It's not much different from when you get an unwelcome, unwanted stranger showing up uninvited at your house demanding entry, shelter and succor in your home as if it's their right to invade your home and use up your resources. You tell them no, send them away to exercise their freedom somewhere else and you permanently close the door on them. You don't "punish" them for their audacity, you just get rid of them.
Likewise with banning and deportation, it's just setting free and sending away someone who doesn't belong in Canada, has no right to be in Canada, has entered Canada illegally and broken Canadian laws and thereby become a criminal to Canada.
Punishment is when you take away their freedom and their money and keep the criminal/stranger forcibly restrained and confined to work like a slave in your house/country and you do nasty things to them in retaliation and retribution during their imprisonment.
I think for most people that banning and freedom somewhere else is probably preferable to imprisonment and punishment in a place where you aren't wanted.
Anyway, here are the reasons for banning and deportation and the procedures for doing so:
Removal Orders in Canada : departure, exclusion and deportation | Apply To Canada
Immigration Violations - Immigration to Canada Information
.