Here's why she used it:
* To investigate: She, Ron, and Harry suspected that Draco Malfoy might be the heir of Slytherin, who was opening the Chamber of Secrets. To confirm their suspicions, they wanted to eavesdrop on him and gather information.
* To get closer to Malfoy: By transforming into Millicent Bulstrode, a Slytherin student, Hermione could gain access to Malfoy's presence and learn more about his potential involvement.
The Polyjuice Potion played a pivotal role in their investigation and ultimately helped them uncover the truth about the Chamber of Secrets.