They don't have a brain, hence pain is not processed the same way. In nature, creatures like mussels survive where even other molluscs cannot. These settings are often fraught with environmental stresses. Storms, falling or tumbling rock, logs ashore, radical temperature shear, predation etc...