The reason Dumbledore says he has kept this and other secrets hidden for so long is because he has been reluctant to burden Harry with the most terrible secret: the contents of the prophecy. The prophecy was originally made to him by Sybill Trelawney, while he was interviewing her for her teaching position, and unexpected by either of them:
The one with the power to vanquish the Dark Lord approaches ... born to those who have thrice defied him, born as the seventh month dies ... and the Dark Lord will mark him as equal, but he will have power the Dark Lord knows not ... and either must die at the hand of the other for neither can live while the other survives ... the one with the power to vanquish the Dark Lord will be born as the seventh month dies ...
One of Voldemort’s followers overheard the first half of the prophecy, and reported it to him. Although there were actually two newborn boys whose parents fit the description in the prophecy (the other being Neville Longbottom), Dumbledore believes that Voldemort chose to attack Harry because he was a half-blood like himself, while Neville is a pureblood. In doing so, Voldemort inadvertently “marked him as his equal.” According to the prophecy, either Harry or Voldemort must destroy the other one day.
Finally, Dumbledore confesses that he did not make Harry a prefect, despite his many worthy achievements, simply because Dumbledore did not want to burden him with more responsibilities. Dumbledore reveals that he cares very much about Harry, even to an unwise degree – Voldemort has always believed love to be a weakness that can be exploited, hence his use of Sirius to lure Harry to the Ministry.