Why do chameleons change their body colour?

to blend in with their surroundings, to help keep them hidden from predators.