Here are a couple of my previous notes on this issue:
One reason to sacrifice a man for the sake of society can be found during criminal trials. A man, Robinson, who committed a real crime (hurt someone or stole property) made it clear to everybody that he found it OK to sacrifice other people’s rights or welfare unlawfully for his own selfish ends. He is amoral; he does what he can get away with. It’s true that this time, he got caught, but he’ll be more crafty in the future, if he gets a light sentence.
As a result, the judge acquires the right to a symmetric retaliation: he throws the book at him. He punishes Robinson in part in order to make an example out of him to other people. The judge hopes to reinforce the deterrence stimulus for them against future crimes. The people are told: “This is how not to live. Behold Robinson’s disgrace and fall and avoid acting like him.” That may be a utilitarian decision by the judge.
(Or imagine a mother watching a public execution of Robinson with a young boy. “See him, Timmy?” she says. “Don’t be like him, or the monsters will get you.”)
Robinson becomes a tool, a means to an end, but then he considered other people his own tools. Turnabout is fair play.
In many ways, God will do unto you as you did unto others. If you never wickedly sacrificed any other person’s rights for your pleasure, or their greater happiness for your lesser happiness, then God will be prohibited by His own righteousness and goodness from sacrificing you. You will not be made an example of. You are in control of your own fate.
In short, produce more than you consume, bear fruit for others to eat, and you can be assured that God will not want to shame you for edification of all concerned.