Why is Harry such a jackass from book five onwards?
* Part of Voldemort's soul was inside him.
* And he's a teenager.
* And people keep killing his loved ones without warning. Gets to a man.
* And the entire country thinking that he was nuts for most of book five and the most wanted wizard in the country in book seven didn't help much either.
* Not to mention the fact that the most shit-scary evil wizard in all wizardom - the same one who killed his parents, no less - has come back from the dead and is gunning for him personally. I'd be a bit on edge.
* I think the annoyance with Harry is more due to the fact that he is a jackass at the wrong times. For instance, in the fifth book, he is at his whiniest because Cedric is dead (he didn't even like Cedric), and because people don't like him (the school turns against him pretty much once a book anyway). However, after his godfather/father figure is killed he is much much much less whiny, so he basically looks like an idiot for whining all the time before, or a jerk for not whining more once Sirius is dead. At least, that's why I want to smack Harry's head into a wall in the later books.
** Cedric's death doesn't upset Harry because he liked him. Cedric's death upsets Harry because Harry feels that Cedric's death is his fault. One of Harry's more common coping mechanisms for guilt is to take it out on everyone around him.
** And I think that Sirius' death made Harry realize that it's more than him, hence less whining. It lasted almost until the start of the next book.
* He's lost any trust he ever had in established procedure and authority... which admittedly wasn't much. When said authority tells him stuff like "be nice" and "don't torture people", he's less likely to listen than before.
* PTSD. In addition to the things already mentioned (having a psychopath trying to kill him, and killing all his loved ones, and having a direct link into said psychopath's brain), Harry spent the first 13 years of his life in a physically and emotionally abusive family, and is basically the wizarding world's equivilant of a child celebrity. Really, it's a miracle that he isn't MORE messed up than he is.
* I think the Potter Puppet Pals summed it up the best:
Harry: My parents are dead, my life sucks, I can't hold down a girlfriend, and I'm surrounded by f**king goblins and sh*t all the time! I mean, what the f*ck?!?
* Indeed. In the final book, he's got intense support from a number of different factions, and he doesn't bother to even say "thank you" when someone helps him. He's arrogant and ungrateful and pretty much a jerk.
* While all the rationales for him being a jerk are fair, I think that a part of Harry's problems is that he tends to react to stress by introverting and becoming hostile to those around him (even those who are his friends and mean well). It's part of what makes the characters interesting in that, for the most part, they all have good and bad parts to them.