Yes, we know that but the context was not reported at the time, we don’t know if the judge knew, and were wondering about that.
In the interests of knowing about the causes of crime, it is always worth knowing as much of what went on before in the criminal’s life as possible. There are plenty of people from traumatic backgrounds who don’t commit terrible crimes; but nevertheless, in a great many cases people who commit crimes have come from adverse family backgrounds.
In the interests of preventing future crime it is worth trying to rehabilitate people incarcerated when they are still young as far as possible.
If the judge had known more about this killer’s background, maybe the judge might have asked for special psychological attention for the criminal while they are in prison. (Maybe he has.)
This young criminal will be out one day, so this is not about altruism or excusing a horrendous murder.