Should Gender and Race be a factor in Legal Compensation?

Apparently it often is, according to this Washington post article.

Should there be any relationship between fairness and accuracy when it comes to compensation, and how accurate are those charts that are being used?

I’m torn on this. On the one hand, I think the emphasis should be more on penalizing the lead-coating behavior, or penalizing the car-crash behavior, than on compensating for the damages. So race or gender shouldn’t matter. If you coated building interiors in lead paint, you have caused physical harm, regardless of race or gender - in the same way that if you murder a black woman, you should incur the same penalty, legally, as if you murdered a white man.
But - if we go by compensation mindset - if I were to be hit by a car and paralyzed, I’d miss out on maybe $2.5 million in life earnings. If Stephen Curry were to be hit by a drunk driver and paralyzed, he’d be missing out on maybe $250 million in life earnings. So it wouldn’t be fair to compensate Curry only as much as the $2.5 million I’d receive.
So - is it about compensation, or is it about punishment?

There is also the matter of codifying, and perpetuating, race and gender discrimination. The settlements are based on what people will earn…but who knows what race and gender walls will fall in the far(or even near) future, making the charts used obsolete? They are projections based on today’s society-will the effected be able to go back to the courts later for a readjustment if society looks more favorably on those that aren’t white and male?