Survival in the animal kingdom depends on how well adapted a species is, allowing it to obtain food, reproduce, and meanwhile not get eaten by predators or destroyed by competition.
Camouflage is one of the primary adaptations nature has provided that allows animals to go undetected and increase their chances of survival. It allows them to hunt without being seen by their prey, and it allows them to escape detection from those that would prey upon them.