I believe if the animal is in unbearable pain [like half its body was crushed by a truck or something], or if it has an incurable disease or is really, really old, or is so vicious and aggressive that rehabilitation isn't an option, euthanasia is the way.