Mesozoic marine revolution
There was a great reproductive advantage for any prey which had even the slightest defence to these predators. Many shellfish developed extra-tough shells. Some burrowed into the sand. Scallops must had had some elementary movement, which developed rapidly under selection.  They became extremely common in the Mesozoic. There are some other methods used by a few scallops. Chlamys hastata often carry sponges on their shell. It is a kind of mutualism. The sponge makes it difficult for starfish to get their tube feet on, and camouflages Chlamys hastata from predators.