You're correct about mental patients, but that doesn't apply here. The authorities haven't had the kid committed, they've kept him in an actual jail.