
It seems to deter those who are executed from future criminal activity.


Why don't you compare the rates at which blacks and whites commit crimes?
Blacks commit crimes disproportionately, so in a perfectly fair penal
system, blacks would be disproportionately represented.

(Note: black vs. white crime rates is not a racial thing.  It's probably
an economic thing: poor people are more likely to commit crimes, and blacks
are more likely to be poor.  The way to reduce the proportion of minorities
in prison is to increase the wealth of minorities.)