The most likely reason that the sand crab developed its sandy color is:
It likely adapted the color to hide from predators in the sand.
This color adaptation provides camouflage, helping the sand crab avoid being seen and eaten by predatory birds, thereby increasing its chances of survival and reproduction.