The claw and other limbs of a crab assist escape because they can be shed and regenerated.

References

"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)

Book
The Hidden Powers of Animals: Uncovering the Secrets of NatureJanuary 1, 1970
Dr. Karl P. N. Shuker

Organism
Crabs, Lobsters, And ShrimpsDecapodaOrder