Anger happens when something unexpected and negative occurs.
So you do something that makes me mad. You trip me for no reason. I get mad because I didn’t expect it, or rather I expected you not to do that. We talked about expectations before, and typically, they are negative. But this is a little different.

If I think you’re a good person and you do something mean to me, that will make me mad. I thought so much of you that I didn’t think you would do that. Based on what I know about you, I wouldn’t expect you to do something like that.
You could be angry that you got hurt. Angry at the person that injured you. Angry at God. You didn’t anticipate this. So you’re mad that it happened.
You aren’t going to get mad about a promotion. Or about a surprise vacation. But if you get fired for no reason, you’re going to more than likely be angry. So those are the two qualities: negative and unexpected.
If you knew it was going to happen, you could expect it, and you may fear it. But you can’t fear what you don’t take into account. That’s where anger comes in.