Hmm, I imagine those little pellets on the inside of this thing's crests/back fins are what earns it its name. Whenever it feels threatened, it shakes its back and sends the little pellets flying where they explode in the face of whatever predator tried to eat it a few seconds later. I imagine the little pellets are full of volatile chemicals that are normally safely separated when inside the little pellets, but mix and then explode once the crab releases them; of course, they would regrow after some time, maybe a couple weeks or something.
This is, of course, just my personal hypothesis. Feel free to use it if you like!