The latest report by an international paleontology research team showed that the eunotosaurus living in South Africa 280 million years ago is the ancestor of modern tortoises  They survived the mass extinction from Permian to Triassic  At that time, in order to avoid the harsh natural environment, they worked hard to dig into the ground  At the same time, to ensure that their digging movement of forelimbs was strong enough, their body needed a stable support, which resulted in the continuous widening of their ribs  It can be concluded that the tortoise has a shell to adapt to the environment
Only digging holes can the eunotosaurus survived the mass extinction.
 And the shell is not for protection, but for digging holes underground