Garlic is a common ingredient in a lot of commercial crab food. They put it in for scent, but it is not acceptable for crabs.
http://www.symbianize.com/showthread.php?t=5746 says "Onions and garlic have a chemical that damages red blood cells in dogs and can cause anemia. Even one small whole onion can cause death. So be particularly careful when disposing of left-overs that contain a significant amount of onions, such as pizza or Chinese take-out. The small amounts of onion and garlic powder used in pet foods is safe and well below the toxic levels."
When you're talking about trace amounts of onion or garlic in crab food, however, one needs to remember that a crab's entire meal is a "trace amount" and therefore no level of toxicity can be considered safe.