Why do parrots have the ability to sing/mimic
Imitative vocal learning is also a reliable social display of neural functions—requiring good hearing, memory and muscle control for sound production—that may be under consideration by a potential mate or ally.
Playback studies of geographic dialects from wild parrot populations have shown that birds react more strongly to their local tongue.
Maybe this is the best reason for these parrots to imitate: to better command the attention of a potential listener by producing sounds for which the listener already has a memory (or a "neural template").
The existence of a preformed perceptual template in the listener makes another parrot's imitations of him or her easier to perceive in a noisy environment. Imitations may even be directed to specific intended receivers.