It's good I think for the justice system to think carefully about how to do that. People assume the courts should be lenient in order to try and rehabilitate, but I don't always think that is quite right,
The idea to rehabilitate if possible is good, it's fundamentally better for everyone and society. But it can be hard to know how to be effective.
I am not in the UK, but a few years ago there were some changes made to prosecution of youth here; where before they had avoided custodial sentences, someone said - wait - a lot of these kids are having problems because the home environment is bad, and their friends and community probably contribute too. If we could get them out of that earlier, into a supportive detention, maybe that would actually allow us to help them before things get to the point where they aren't going to be able to turn back. So they tried that, and it's been successful. Of course it's not like it's changed everything, it's not magic, but moving kids in terrible home situations to a place where they are given regular food, exercise, good teachers who can deal with learning issues, disapline, and role models, seems to work better when they are 13 than when they are 17. There is an overall reduction in recidivism, which is a good outcome IMO.