The Create Ragdoll window helps with attaching Character Joint, Capsule Collider, and Rigidbody components to humanoid characters' rigs. Those characters don't have to use the HumanoidumanoidHumanoid rig in the same way as the Mecanim feature.
Rigid bodies, colliders, and character joint components create a ragdoll. To turn the ragdoll on, we need to disable the Animator component as animations override the movement of rigid bodies. This is what our script does. It also makes the ragdoll's rigid bodies kinematic when the ragdoll is off, to turn the physics simulation off when it's not needed.