Hermione had gotten close to the elves, Topsy in particular, as Topsy had helped heal her after one specific ordeal. Topsy had promised Hermione that she would do anything she needed her to, even if it meant betraying her master, and Hermione hadn’t cashed in on the promise, not until now.