In Perek 21, it discusses the concept of Egla Arufa - a person was found dead outside a city and the elders have to bring a calf to the nahal, kill it by breaking its neck and say they did not spill the blood of the man.
What does killing a calf have to do with this mans death? We find killing for a korban, killing for food, killing for punishment - but since when do we kill something, specifically in a way it cannot then be eaten, for no specific reason?
Whenever you take a life, whenever you kill (let's talk about killing an animal not a person), it affects you in some way. True, the killing is allowed, and even required, but it still affects you to spill the blood and take a living being and kill it. Perhaps it makes you consider the fraily of life, perhaps it makes you consider the necessity to repent (as it should when bringing a korban), perhaps other thoughts would be aroused. But it somehow affects you.
When you kill this calf, it has to affect you. Even more so because there is no direct reason this calf is being killed - it is not being eaten, it is not being punished for something it did wrong, it is not being offered as a korban. The elders will be affected by the killing of this calf.
And that is the desired goal. They will see the killing of this calf and consider what a waste of a life. They will regard the useless, pointless loss and take it to heart. They will compare it to the loss of the person's life, that it too was useless and pointless, and only happened simply because they did not treat him properly (escorting him, as chazal say).
They will learn the lesson, by "pointlessly" killing this calf, that people need to be treated with some base level of respect.