In our justice system there are two types of compensation that can be awarded to a victim.
Compensatory: This is an amount directly linked to the amount of demonstrable loss the victim can prove. So if someone broke your leg with a baseball bat, you would get the amount of money it cost in medical bills, the amount of money you lost by not being able to work, etc.
Punitive: This award has NOTHING to do with the victim. This is an amount intended to punish the guilty party and the size of this award is partially based on an amount of money that would discourage the guilty party from engaging in similar behavior in the future. So for instance, when McDonald's has over 700 reported cases of people being severely injured by their very abnormally hot coffee being served in a cup that has shown a significant tendency to fail under normal use that multi billion dollar company has to pay around $1 million in punitive damages in the hope that they will take reasonable precautions to protect customers from literally life threatening burns.
So justice absolutely recognizes that the punishment has to fit the person being punished.