The purpose may be protection but the result is punishment, while also making it impossible for offenders to reintegrate into society. It's why that kid in Illinois offed himself rather than try to build a life out of the ruins.