If you've ever heard the expression "fair weather friend," you know that it's often easy to be friends with someone when things are going well (when the weather is fair, so to speak). Real friends will also stand by you when storms blow up in your life. Even at times when being your friend isn't much fun, the people who really love you will stick around anyway; that's what friendship is all about.
This may seem like a trite observation, but it does appear to be the theme of Harry's friendships in Order of the Phoenix. Harry is a giant walking ball of resentment in this book, but his best friends all endure his bad moods. Hermione and Ron both scold him for his temper tantrums, and even Ginny gets quite sharp with him when he's afraid he's being possessed by Voldemort. But they all put up with his foul temper, his defensiveness, and his sudden aggression because they love him and they trust that he'll snap out of it at some point. Luckily for him, he does – but not until after Sirius has died, which appears both tragic and terribly unfair.