One common theme is redemption. Draco is often seen as a character who needs to be redeemed, and Harry's protection plays a part in that. For example, Harry's actions can make Draco realize there's more to life than following the dark path.
In many cases, the main antagonists can be other Slytherins who still hold grudges against Harry or are loyal to the pure - blood supremacist ideology. They might see Harry as a threat to their way of life. Also, some Death Eaters can be antagonists. They target Harry because of his role in Voldemort's downfall and would stop at nothing to get to him.
One popular 'harry protects draco fanfiction' is 'The Protector'. In this fic, Harry realizes Draco's not as bad as he seems and starts to protect him from the real threats in the wizarding world. It has some really great character development.
One common scenario is in a dangerous magical situation. For example, in a battle at Hogwarts, Draco might step in to protect Harry from a dark wizard's spell. Another could be in the face of social threats within the school. Maybe some students are trying to bully Harry, and Draco, having a change of heart, defends him. It could also be that Draco protects Harry from a plot within the Slytherin house that aims to harm Harry due to his fame as 'The Boy Who Lived'.
He might simply stand between Draco and the girls. Harry is quite well - known and respected, so his presence alone could be enough to make the girls back off a bit.
One popular 'Draco protects Harry' fanfic is 'The Green Serpent' where Draco's hidden loyalties lead him to safeguard Harry in the face of dark forces at Hogwarts. Another could be 'Draco's Redemption' which shows Draco's transformation and his determination to keep Harry out of danger. There are also many on Archive of Our Own (AO3) under the 'Draco/Harry' relationship tag that explore this theme.
One reason could be that Harry has a newfound sense of fairness. He realizes that Draco is constantly hounded by over - eager girls and he doesn't think it's right. Harry has been through a lot himself and he might empathize with Draco not wanting to be bothered all the time.
People like 'Draco protects Harry' fanfics because it offers a different dynamic to their relationship. In the original series, they were sort of enemies, so seeing Draco as a protector is a fresh take. It adds an element of redemption for Draco's character.
In the wizarding community at large, he could become an outcast. Other wizards and witches would likely look down on him, and he might find it difficult to get support or make alliances in the future. His actions could also lead to him being targeted by those who support Hermione and want justice for her.
One possible reason could be that Draco has had a change of heart. Maybe he realizes that Hermione is a person worthy of protection regardless of her House or her friendship with Ron. He might have seen some injustice about to befall her from Ron and his Gryffindor bravado getting out of hand.