Turtles, Clams, And Crabs all have shells but are grouped in different phyla because turtles' shells originated from rib bones million years ago and not from chitin seen in Clams and Crabs.
Turtles are ancestrally from the lizard and snake families. The early turtle are known for their hard ribs which protects them and also help in buoyancy.
Overtime, they started out as big rib bones which grew and hardened to become shell that are seen with modern turtles.
The shell serves as armour which protect them from being consumed by predators. And this is regarded as an adaptive feature for turtles survival in their habitat.
Learn more about turtles shell: https://brainly.com/question/17284505?referrer=searchResults