I ought to have been clearer on what I meant. When an action degrades the quality of life (just to use a general term) of course it should matter in a court of law.
My point was merely that when deciding on the sentence, the law should consider the need of the society while leaving the emotions of individuals out of it to the extent this can be done without causing further harm.