Many tropical insects and birds show iridescence and despite their brilliance, I have a theory that it is a form of cryptic colouration - what we used to call camouflage.
I think that frequent warm jungle rains followed by sunshine means that often there are puddles of water on leaves, and if a tasty butterfly, bird or beetle can look like the reflection of the sky off water, it is less likely to become lunch for a bird. However if it happens to become the object of unwanted attention, it merely needs to shift itself and it disconcertingly either 'disappears' into another colour, or, at another more acute angle, grows very dark and blends in with the shadows.
But if it does want to stand out, perhaps to a show off to a prospective mate, then the same colours twitching and vibrating in sunshine are alluring and attractive, as peacock feathers also were to Edwardian milliners, for hats.
These images are the one butterfly, the Green Buddha Swallowtail, or Peacock Swallowtail (Papilio blumei), (native of Sulawesi) that I photographed at different angles with respect to the light. It's hard to believe it's the same species, isn't it?