That's because fiction is fiction, especially one created for the masses must be written in terms masses can relate to.
As for reality, creating an AI that will actively hate us is a feat of about the same difficulty as creating an AI that would love us. Those are two opposite points of a tiny island called "has more-less human mind" that floats on a vast ocean named "we all die". The biggest challenge of surviving superhuman AIs is locating that island.
As the words of wisdom say, "The AI does not hate you, nor does it love you, but you are made out of atoms which it can use for something else."
As for reality, creating an AI that will actively hate us is a feat of about the same difficulty as creating an AI that would love us. Those are two opposite points of a tiny island called "has more-less human mind" that floats on a vast ocean named "we all die". The biggest challenge of surviving superhuman AIs is locating that island.
As the words of wisdom say, "The AI does not hate you, nor does it love you, but you are made out of atoms which it can use for something else."