Sentencing is another phase, and that is where mitigating factors may be assessed and evaluated.
“But we are either a nation of laws, or were not.”
Never said otherwise.
I don’t see any “mitigating factors”.