Here's why:
* He saw Sirius Black enter the Department: Harry witnessed Sirius going into the Department of Mysteries in "Order of the Phoenix" and believed Sirius was searching for information to help them.
* He was searching for answers: Harry felt lost and desperate for answers about Voldemort's return and his own connection to him. He hoped the Department, known for its mysteries and secrets, might hold clues he couldn't find elsewhere.
* He felt drawn to the place: The Department of Mysteries was a place of powerful magic and unknown knowledge, which inherently drew Harry's attention.
It's important to note that Harry's desire to enter the Department was driven by his desperation and his conviction that it held answers, not by a desire to stay there. His mission was to uncover the truth and find a way to defeat Voldemort, and he believed the Department was the key to that.