Hello. This reminds me of a trip I had to the museum last year. We were walking around the animal exhibit when our tour guide stopped us and pointed at the Tui. She told us that they are very talented at mimicking noises which it hears. She told us about multiple occasions in which the Tui had mimicked her.
She told us it mimicked the sound of a car alarm once and wouldn't stop making the noise for weeks. She also said that she saw a Tui sitting at an intersection and copied the screeching sound of the brakes of driving cars which had to stop.
As for your question on why a cockatoo can mimic human noises, I am not certain, but I know that recent research has proven that they have the ability to move and dance in time to a musical beat with not much of an issue? This question has left me puzzled too. I'll try to get to the bottom of it!