why did dumbledore leave hermione the book