I don't think a life sentence was appropriate, but I don't think you're concern here is really what happened.
judges have some discretion when it comes to which end of the minimum/maximum end of the scale to sentence someone convicted of a particular crime, and using facts entered into evidence and never contested when exercising that is pretty standard.
> the assassination attempt was taken into account by the judge for sentencing
There are a whole slew of problems advocating for the ability for judges to sentence people for crimes they were never convicted of.