The mechanism that makes you pissed at the world is the following:
First, something happens - not necessarily bad, but enough to affect you somehow: stop you from enjoying yourself, keep you from what you want, annoying you, whatever. Either way, let us call the effect it produces in you, minor annoyance, or temporary pain.
Second, you (you unconscious mind mostly) creates a story around that. Something along the lines of "I never get to enjoy what I want!"
Third, when the same event happens again, the story kicks in and you cling to your temporary pain. You actually hold on to it, letting it block you, hold you back from the present moment.
So yeah, this is the mechanism ... and if you're upset remember that what you're looking at is actually You, holding on to pain!
It's an example of masochism.
I just wanted to write it somewhere so I'll remember my sudden ... understanding?
The internet seemed like a good place.