Useful discussion would involve looking at what led to this person getting to this point in their lives, what interventions failed, what interventions were needed but unavailable etc. Learning from people who do awful things is crucial to preventing others from doing the same. It also means holding to account statutory and in some cases voluntary services to account as well as our government who is underfunding both.
The punishment is loss of liberty but to me the role of the justice system is more than that - it's also about public safety and public order, but also in some cases where its appropriate-rehabilitation and working towards the prevention of reoffending.
It's not purely revenge which is why families don't set the sentencing of someone who's harmed a loved one nor do victims. It needs to be just in a wider societal context and that also means in the context of the possibility of miscarriages of justice. Or in the context where someone has been harmed and traumatised to such an extent they become harmful themselves.