Because the law does not consider someone's life history as a reason to increase - or indeed decrease - a prison sentence, because the law is unemotional and factual, and has to be, in order to function correctly.
Let's turn the situation round - suppose this man had mugged someone who it turned out was a convicted paedophile. Would you then want him not only not to be prosecuted, but to receive the freedom of the city?
It's not how the law works, emotion is not used in sentencing, and it works better on that basis.