Then you and I work differently, and I will stand by my claim that if you/OP don't factor in 'irrational' hate, you won't understand people's behavior.
Anyway, the underlying principle is one of morals and ethics, in a sense. The sensations of hate, resentment, or disgust are the outward manifestation of a calculation to determine who to trust. Naturally, someone who repeatedly screws you for personal gain should not be trusted. The result is the feeling of hating them.
But it is not only about raw 'utility'. Someone who does annoying things (Medium), or demonstrating tremendous hubris or arrogance, or just does things that are or should be inappropriate, gets resented also. If you send me lots of unsolicited emails, I can find a way to explain why I hate you in terms of a utility calculation ("you are taking up space in my attention that I don't want to give you"), but that's just hand-waving -- I just hate you (to some mild degree) and I'm working backwards from that.
Anyway, the underlying principle is one of morals and ethics, in a sense. The sensations of hate, resentment, or disgust are the outward manifestation of a calculation to determine who to trust. Naturally, someone who repeatedly screws you for personal gain should not be trusted. The result is the feeling of hating them.
But it is not only about raw 'utility'. Someone who does annoying things (Medium), or demonstrating tremendous hubris or arrogance, or just does things that are or should be inappropriate, gets resented also. If you send me lots of unsolicited emails, I can find a way to explain why I hate you in terms of a utility calculation ("you are taking up space in my attention that I don't want to give you"), but that's just hand-waving -- I just hate you (to some mild degree) and I'm working backwards from that.