We know that Centaurs are incredibly skilled with Divination – far beyond the capabilities of most humans. They read the future through the movement of planets, and after Firenze is is banished from the other centaurs, he teaches Divination at Hogwarts (showing it to be his specialist subject).
Throughout the Harry Potter series, the magical community as a whole seem sceptical of Divination, and a lot of people don’t believe that it’s possible to truly read the future using it’s methods. However, from hints that J.K Rowling leaves throughout the series, Divination is more accurate that the wizarding community may believe, and it seems like the centaurs knew Harry Potter’s destiny all along.
In the Philosopher’s Stone, when Harry is alone in the Forbidden Forest and confronts who turns out to be Professor Quirrell (and in turn Lord Voldemort), Firenze the centaur rescues Harry and takes him away. What’s more, Firenze warns Harry after this that the Forbidden Forrest is not safe for him to visit, and that he should stay away.
For rescuing Harry, Firenze later argues angrily with Bane, another centaur who says “Remember Firenze, we are sworn not to set ourselves against the heavens. Have we not read what is to come in the movements of the planets?” and then proceeds to say, “For the best! What is that to do with us? Centaurs are concerned with what has been foretold!”.
Bane is angry that Firenze has meddled with what has been foretold in the future, and believes that it is not their responsibility to try and change the course of the future themselves.
This suggests that Bane and the other centaurs have used Divination to see that Harry Potter would meet Lord Voldemort in the Forbidden Forest, where he is killed by Voldemort. It was because of this that Firenze rescued Harry – wrongly believing that to be the confrontation where Lord Voldemort was destined to kill Harry.
While it might not have happened then, seven years later Harry did confront Lord Voldemort in the Forbidden Forest after the Battle of Hogwarts where he was killed, something that the centaurs knew would happen even in Harry’s first year at Hogwarts.