From Harry Potter and the Half-Blood Prince —
Professor? He said finally. 'Do you think the Horcrux is here?'
'Oh yes,' said Dumbledore. 'Yes, I'm sure it is. The question is, how do we get to it?'
'We couldn't . . . we couldn't just try a Summoning Charm?' Harry said, sure that is was a stupid suggestion, but much keener than he was prepared to admit on getting out of this place as soon as possible.
'Certainly we could,' said Dumbledore, stopping so suddenly that Harry almost walked into him. 'Why don't you do it?'
'Me? Oh . . . OK . . .'
Harry had not expected this, but cleared his throat and said loudly, wand aloft, 'Accio Horcrux!'
With a noise like and explosion, something very large and pale erupted out of the dark water some twenty feet away . . .
'Did you think that would happen, sir?'
'I thought something would happen if we made an obvious attempt to get our hands on the Horcrux. That was a very good idea, Harry; much the simplest way of finding out what we are facing.'
The first time I read this section, I thought Dumbledore was just being nice to Harry. However, I think it's connected to the following section.
From Harry Potter and the Deadly Hallows —
'And once we get hold of it, how do you destroy a Horcrux?' asked Ron.
'Well,' said Hermione, 'I've been researching that.'
'How?' asked Harry. 'I didn't think there were any books on Horcruxes in the library?'
'There weren't,' said Hermione, who had turned pink, 'Dumbledore removed them all, but he — he didn't destroy them.'
Ron sat up straight, wide-eyed.
'How in the name of Merlin's pants have you managed to get your hands on those Horcrux books?'
'It — it wasn't stealing!' said Hermione, looking from Harry to Ron with a kind of desperation. 'They were still library book, even if Dumbledore had taken them off the shelves. Anyway, if really didn't want anyone to get at them, I'm sure he would have made it much harder to —'
'Get to the point!' said Ron.
'Well . . . it was easy,' said Hermione in a small voice. 'I just did a Summoning Charm. You know — accio. And — they zoomed out of Dumbledore's study window right into the girls' dormitory.'
I believe that Dumbledore, with his mind full of intricate plans and ideas, forgot to think of the simple Summoning Charm, when he (most likely) put his protection on the books on Horcuxes.
— Quora user Pontus Colliander