The claw and other limbs of a crab assist escape because they can be shed and regenerated.
“In some invertebrates, autotomy can involve the loss of one or more legs. Crabs, for instance, are famous for sacrificing a claw if attacked by a predator, which they will then regrow. Indeed, they are willing to lose several of their limbs if necessary to avoid capture, though this willingness decreases markedly with each successive limb loss, for obvious reasons.” (Shuker 2001:132)