How do we even know the Ancient pronunciation? Isn't it a stab in the dark?
There are many ways. Ancient authors might have noticed the changes. I know there is a grammar that was found in Alexandria (sorry I can't find the source I'm looking for it right now) to help foreigners read Homer, this means they were aware of language change. They might have written about it.
Pronunciations can also be reconstructed from the current dialects of Greece. This is done the same way as reconstruction languages like PIE.