I’m certainly not a legal scholar, but I have the vague sense that most civil cases are decided based on facts, and judgments are based on a theory of restitution or punitive damages to discourage specific behaviors or redress specific harms.
Although I recognize I have an idealized vision of the world, I believe judges are discouraged from simply punishing a party because the judge believes they “deserve” it.