Where does annoyance come from? Why do we experience it?

Perhaps my framing of the question is too vague, but it may help if I explain what prompted it.

I was doing some aimless surfing on StumbleUpon when I came across an infographic about profile photos on Facebook. I felt mildly annoyed and had a thought akin to “great, another infographic on the Internet”. Yet infographics are pretty neat - they present interesting information in an aesthetically pleasing and easily digestible way. Actually, I like them, and I hadn’t seen this particular one before. So why did I feel annoyed at seeing “yet another” one? I can only assume the germ that incited that feeling has something to do with the copycat nature of many people repeating a very similar concept and my desire for a steady stream of entirely novel stimulation was pulsing. But so what? What purpose does this feeling of annoyance serve? Why would I suddenly feel it when seeing something I’ve always enjoyed?

But even in other cases where we get annoyed at the behavior of others (even if it doesn’t really affect us in any direct way) or things in our environment, it seems to be a pretty useless emotion all-around. The only thing it really seems to achieve is a negative impact on the person experiencing it. Not to be trite and play the evolutionary-advantage card, but how is that helpful?

Annoyance is like pain. Its purpose is to make you do something to alleviate the situation that is causing it. As with pain, however, sometimes you really cannot do anything to alleviate the situation, and sometimes it is not very apparent what the actual cause is anyway.