Green anoles display their dewlaps for breeding and to establish territory among males. When a male anole enters the territory of another, the holder of that territory displays his dewlap and bobs his head up and down. Often the intruding male will leave, but he might also return the display and try to take that territory. Such encounters can turn violent.
Male anoles will also display their dewlaps when their territory is breached by people, dogs, chickens and the like. In this photo, the male anole is displaying his colors at me, but with an air of resignation. I think this is because he recognized me and knew that I was mostly harmless and, no matter what he did, I wouldn’t go away until I’d taken a few photos.