they do the thing because they Like The Sound. caiques are extremely rhythmic birds, moreso than other parrots. although caiques are capable of hopping and dancing, they also go into sound-induced trances – where they either sway along to a noise or they repeatedly make a noise (as shown here). in a way, it’s a form of stimming.
because when you put light through a prism, you get the seven colours of the rainbow in a similar effect to when sunlight shines through wet air and displays a rainbow