Neither circumstance is putting more or less weight on the crime itself or piunishing them for what they "thought". They are simply making the destinction between a person that is more likely to be a continuing threat to others and one that is not.
But that makes the assumption that racism is a reliable indicator of whether someone is a continuing threat, which it is not.
The previous is doing just the opposite. It is speaking to the character of the defendant as being a hateful and easily provoked person who is not a good man and does not deserve leaniency.
But again here you have made another assumption. Being a racist does not mean that you are easily provoked. Cobray said that, "Obviously, though both of these men are murders, the latter deserves a far weightier sentence. Instead of being irresponsible, he is willing to commit a murder based on something as simple as race, and is probably psychotic." Thats a value judgement the law shouldn't take into account.
Making the statement that the racist is worse because he kills based on his prejudice is making a value judgement on the underlying idea which the government has no business doing. If a person has a clean record and commits a hate crime, do you truly have any evidence that the person is going to commit an additional crime other than you own personal value judgment that racism is a bad thing? The answer is no.
If a person has a clean record then their sentence should reflect this. If a person has a spotty record than their sentence should reflect this. There is NO reason to take "thought" into account.