It is waiting for the moment to evolve. At this stage, it can only harden, so it remains motionless to avoid attack.
Inside the shell, it is soft and weak as it prepares to evolve. It stays motionless in the shell.