No doubt it came in on some live rock or a frag. At this size I don't think it's a problem. A couple of things to look for in crabs to determine if they will be a problem. Look at the back legs. If they are paddles rather than regular legs, it's a swimming crab, and those tend to be problems. Look at the claws. If they look like they are for grabbing, they tend to be problem crabs. Look up an image of a gorilla crab and you'll see what I mean.
Even if the crab doesn't fit into one of those two categories, it can still be a problem. Crabs are feeders of opportunity. If they can catch it, they will eat it.