If it is a decorator crab then they like to take peaices of coral, maybe anenomes, and "decorate" themselves. You didn't say what kind of crab it was. It is also wise to find these things out before you purchase it.
HES A ANENOME CRAB.. THEY LIVE IN AND ON THE ANEMONE GOTO SALTWATER FISH.COM LOOK AT CRABS. IF HE LOOKS THAT THE ONE THEY SELL THEN LEAVE HIM HES FINE THERE.. I HAVE ONE IN MINE AS WELL CAME WITH ANENOME. DOING VERY WELL