Hermione had a bad premonition. What if Voldemort wanted to enter the castle via a vanishing cabinet? She needed to go back to the Room of Hidden Things and if she was right, she needed to do something. No idea what, but something.