The regrowth of an appendage begins with a bud in the place of the old appendage. This is evidence that the crab removed the appendage on its own accord. However, there are some creatures that suffer the removal of their appendages not by their choice and so the regrowth process is much different.
Sometimes, individual crabs have to regenerate both of their claws. In this case, the crabs become more of scavengers rather than predators. This would make defending themselves incredibly difficult but the regeneration process is not incredibly long (around a year) and in due time the crabs would have their appendages back and ability to defend themselves. Good things this is a quick process because it may have hosted an arm AND a leg.