At the start of DH, Hermione tells Harry and Ron that she modified her parents' memories.
"I’ve also modified my parents' memories so that they’re convinced they’re really called Wendell and Monica Wilkins, and that their life’s ambition is to move to Australia, which they have now done. That’s to make it more difficult for Voldemort to track them down and interrogate them about me – or you, because unfortunately, I’ve told them quite a bit about you.
Assuming I survive our hunt for the Horcruxes, I’ll find Mum and Dad and lift the enchantment. If I don’t – well, I think I’ve cast a good enough charm to keep them safe and happy. Wendell and Monica Wilkins don’t know that they’ve got a daughter, you see." (DH)
So why would Hermione consider this necessary?
The Death Eaters are mostly purebloods who don't (want to) know much about the Muggle world. Even the halfbloods like Voldemort himself or Snape are probably out of date with modern life, so they would find it difficult to locate Hermione's parents, unless they had their address from the school or ministry records.
Her parents use a different name.
Her parents are on a different continent.
Her parents are not protected by that memory modification. If the Death Easters, against all odds, manage to find them, they won't believe them that they don't know about her daughter, and probably torture them to get the truth out, or just for fun.
What could her parents really tell Voldemort about Hermione or Harry that is not already known, unless she told them about the Horcrux mission?
The memory modification is supposed to be reversible. Voldemort even managed to recover the memories from Bertha Jorkins that Crouch wanted to remove permanently. So why does she think that if Voldemort manages to find them, he won't be able to lift the enchantment?
Since comments raised the question whether Voldemort would be able to lift the enchantment, here the part where Barty Jr. talks about Bertha
"Yes," said Crouch, his eyelids flickering again. "A witch in my father’s office. Bertha Jorkins. She came to the house with papers for my father s signature. He was not at home. Winky showed her inside and returned to the kitchen, to me. But Bertha Jorkins heard Winky talking to me. She came to investigate. She heard enough to guess who was hiding under the Invisibility Cloak. My father arrived home. She confronted him. He put a very powerful Memory Charm on her to make her forget what she’d found out. Too powerful. He said it damaged her memory permanently." (GoF)
Although her memory is supposed to be permanently damaged, Voldemort still manages to extract the information from her.
My master had found out that I was still alive. He had captured Bertha Jorkins in Albania. He had tortured her. She told him a great deal. She told him about the Triwizard Tournament. She told him the old Auror, Moody, was going to teach at Hogwarts. He tortured her until he broke through the Memory Charm my father had placed upon her. She told him I had escaped from Azkaban. She told him my father kept me imprisoned to prevent me seeking my master.
Therefor this memory modification doesn't protect Hermione's parents, and it doesn't protect the trio. Why did she do it anyway?