Criminals are sentenced according to legislated maximums for given crimes. Those maximums change from state to state and at the federal level. Some crimes do not provide for life imprisonment. For example, carrying child porn across state lines isn't a federal life offense.
The confinement extensions at issue here are civil in nature, not criminal, which is where the question about consitutionality came in. Civil confinement was introduced as part of the civil commitment portion of the Adam Walsh Child Protection and Safety Act of 2006.
The Fourth Circuit Court of Appeals had previously held that the civil commitment portion of the law exceeds federal authority. The federal government, the court wrote, does not have the power to "regulate all sexual violence, including acts which violate no criminal statute."
And this is nothing new. Many states have similar civil confinement laws with regard to sexual predators. Call it "clinical seclusion" or something of that nature if it makes you feel better. Whatever you call it, it is absolutely necessary. People who prey on children cannot be cured.