When you moved it to the rock were their byssal threads hanging out of the bottom from the sand? Did you have to “tug” the clam when you got it up from the bottom in order to move it?
If there were byssal threads when you moved it to the rock, most clams cut anchor and form new byssal threads meaning that the old ones just become decaying matter. The shrimp, nassarius snails, hermits, etc. are ALL opportunistic feeders (and then some with the hermits). I wouldn't be surprised at all if they went over and started picking at the bottom of the clam, annoyed it, and then the thing was finished off because of stress - nassarius snails usually care if something is sick or dying, hermits tend not to and shrimp will go in and finish them off.
I could be wrong, but I am just kind of going off the scenario. The main thing would be sand grains, bits of rubble, or visible byssal threads sticking out of the bottom of the clam when you moved it.
Edit: If you want to keep a clam, you MIGHT wanna consider giving this stuff back to your LFS. "emerald crabs, hermits, and a CBS are my inverts". I mean you don't HAVE to, but these things make it more difficult to keep clams (especially smaller ones).
Here's the whole "Emerald Crab Thing", short version though. Males have pointy girdles on their stomachs and females have oval shaped ones that have darker stripes on them. The males seem to get larger and more aggressive while the females stay small and are less aggressive. My opinion is that neither one should be kept with Tridacna Clams. If you are determined to keep one, that is just a way of telling the difference though.