What does the shell do for the clam?

the shell protects the clam from predators. The shell also helps make pearls when the clam has something that is irritating the clam. The irritating object has to have part of another clams mantle on it" it makes the pearl with the mother of pearl which is the shinny part on the inside of the clam.