Crabs are decapod crustaceans of the infraorder Brachyura, which typically have a very short projecting "tail" (abdomen), usually entirely hidden under the thorax. They live in all the world's oceans, in fresh water, and on land, are generally covered with a thick exoskeleton and have a single pair of claws.
The reason of all rules of Islam is based on getting the benefit and avoiding the harm. Allah (SWT) knows the secrets and real effects , and He ordered us to avoid things which are Haraam, and we believe that He does not prevent us from any thing for no reason, but for His absolute wisdom, whether we know it or not.
Crab, lobster and other sea and water animals except prawns are Haraam. Simply because they ( except prawns) are harmful for our health and He knows the details of the harm. We do trust His absolute wisdom and never argue with Him. Scientific researches are improving day by day and providing more evidence that every Haraam in Islam is in fact harmful. We need to submit to the Will of Allah (SWT) with surety that all His orders to us are to protect us from harm and provide us with benefits.
As far as sea food is concerned, only that fish which has scales may be consumed. In addition, it must be alive when caught from the water. Crabs are not classified as fish and may not be consumed. There is some differences amongst certain ulama' regarding lobsters but the general consensus seems to be that it should not be consumed. See Ayatullah Seestani's Islamic Laws p. 489.