In today's turtles the shell has a key protective function. The animals can withdraw into it and protect themselves against predators. No other group of vertebrates has modified its physique to such an extent to develop an impenetrable protective structure.
But the earliest beginnings of the turtle shell did not serve a protective function. The proto-shell enabled the animals to burrow into the ground and brave inhospitable environmental conditions in subterranean dens.