They are native to all the world oceans and fresh waters. A lot of other animals depend on the crab for their own nourishment. Their job is to clean up the seafloor.
They feed on algae (among other things) and when they burrow into the sand they promote the growth of marsh grass. They are especially good to mangrove forests