Indeed, many feminist scholars have pointed to that very example (men killing women “in the heat of passion”, usually upon discovering them in flagrante delicto) as evidence of systemic misogyny in the legal system.
Otoh, this also points to an important difference between the penological goals of the justice system. Incarceration for the sake of deterrence is appropriate for people who are a danger to others, whether because they consciously choose evil acts, or simply can’t help themselves. But punishment as retribution only makes sense for people who could choose to do right but reject it. That is, I think, why we see people who kill in cold blood as morally blameworthy, and people who kill out of insanity as merely dangerous the way a wild animal is dangerous (with heat of passion killings falling somewhere in between).