So I'm too logical for this question... not to sound big-egoed because, let's face it, we know these things already.
Emotions developed over a lot period of time for the benefit of survival. We become happy when we're doing something pleasurable to the senses and we become sad because something has occurred that we wish hadn't.
Anger is more of a defense mechanism though, protecting ourselves from others' resentfully selfish tactics that would have, many generations ago, probably resulted with our starving or failing to procreate.
We hate because we were angered by someone. If they did something bad enough to make you angry, then the immediate reaction is to be resentful.
It's not so difficult when put into context :)