If they have a mental disability it is taken into account when passing judgment. But many many people commit atrocities because they want to, because they can, and because they don’t fear the consequences.
Taken into account by the society that continues to allow child poverty in this rich nation ?