no, its what they do after their breeding season, they leave their eggs in a 4-12inch hole in the ground,the female chameleon leaves them in hole, it take 3 mounth period for the eggs to hatch!
It is mostly for mating. Females like bright and colorful males. If they were threatened, they would change color to blend in with their surrounding.
I think it's a bit of both. I worked in a shop with chameleons and they seemed to puff up their chins whenever they felt threatened or were with another chameleon. Chameleons usually hate being with other chameleons for any length of time, even males and females.