Dumbledore knew all along that the Dark Lord would return.
When Dumbledore explains to Harry why he sent him to live with the Dursleys, he tells Harry that he knew that the Dark Lord would one day return, and he made his choice with that in mind.
“Voldemort had been vanquished hours before, but his supporters – and many of them are almost as terrible as he – were still at large, angry, desperate and violent. And I had to make my decision, too, with regard to the years ahead. Did I believe that Voldemort was gone for ever? No. I knew not whether it would be ten, twenty or fifty years before he returned, but I was sure he would do so, and I was sure, too, knowing him as I have done, that he would not rest until he killed you.”
- Harry Potter and the Order of the Phoenix, Chapter 37 (The Lost Prophecy)
As he tells Harry, Dumbledore knew all along - hours after the Dark Lord’s downfall, Dumbledore already expected that one day he’d return, and planned Harry’s protection around this.