Well, this kind of fanfiction might be an interesting take on the character. It could explore a darker side of Harry Potter that we don't often see in the original series. Maybe the author wants to show how all the pressure and trauma he has endured could lead to a more cynical view of those around him.
There could be his friends like Ron and Hermione. Even though he hates everyone, they would still be important characters as they might try to figure out what's wrong with Harry and how to bring him back from this state of hating everyone.
Maybe Harry has had some really bad experiences that made him bitter towards everyone. For example, he could have been betrayed by his friends multiple times.
Perhaps the plot could revolve around a magical accident or curse that makes Harry lose his ability to feel positive emotions towards others. As a result, he starts to hate everyone. He begins to act out against the people he once cared about, causing chaos in Hogwarts and the wider wizarding community. His friends would be shocked and try to find a way to reverse the effect, but Harry would resist their attempts.
Perhaps Harry has seen the worst in people too often. He might have witnessed so much greed, envy, and cruelty among those around him that he has lost all faith in humanity and thus hates everyone. He could be in a situation where he feels completely alone and that no one truly understands him.
Dumbledore could also be an important character. He might be the one who tries to figure out what's wrong with Harry and tries to reverse this hatred. Another character could be Snape. He might see this as an opportunity to make Harry's life even more difficult or, on the other hand, might be secretly trying to help him get over this hatred.
Well, in some RWBY fanfiction, the 'everyone hates Jaune' trope might be used to create drama. Maybe the author wants to explore how Jaune would grow and overcome such extreme dislike from others. It could also be a way to put him in difficult situations for character development.
Perhaps in this fanfiction, Naruto discovers some dark secrets about the village. Secrets that make him feel like he's been used all along. Like the village was only using him as a weapon against their enemies. This realization could make him resent everyone in the village, thus hating everyone.
Well, it could be that Percy has had some really bad experiences in his life that made him bitter towards everyone. Maybe he was betrayed by friends in the past, so now he just can't bring himself to trust or like anyone.
Maybe a new, powerful and evil ninja from another land. This ninja could have come to the village and caused a lot of chaos, making Naruto believe that no one in his village was capable of protecting themselves or him. So he blames everyone for their weakness and starts to hate them all, with this new ninja being the root of the problem.