It's about the demoralizing action such a sentence has. With that large of a sentence you will never get parole, you will never be released early, and you will be an example to anyone else that would consider something like that.
No, that likely has nothing to do with the why. It might be one effect of such a long sentence, but I suspect it has more to do with you charge with the crimes you can "prove" and see what sticks. There's no guarantee of guilty on any charges. Charging someone with many crimes increases the chances of at least one guilty verdict. Of course, it also has other potential impacts, too. People make assumptions about people who are charged with crimes, and they make assumptions when someone is charged with A LOT of crimes. Prosecutors could certainly use that to their advantage.
Wait until we start sentencing pedophiles to whole body CRISPR mutation of the oxytocin and serotonin gene so they only get 21 years but become incapable of love and happiness forever. Do you think that would be a better punishment?
Yes make it into a game show where they get a choice: jail forever or 21 years with gene therapy.
If they opt for the therapy: select a random few right after the procedure, make sure you have a camera on the pedos face, tell them they are going to jail forever anyway.
Abusing the criminal justice system for your own perverted revenge fantasies instead of gearing it toward rehabilitation and release is pure fucking evil.