Why did Ultron turn evil?

Why did Ultron turn evil? What Makes Him Pure Evil? He betrayed his creator Pym mere moments after being created, quickly deemed humanity as flawed and has made numerous attempts to wipe out the entire race. He attempted to destroy any of his own creations, such as Vision and Jocasta, when they rebelled against him.

What Makes Him Pure Evil? He betrayed his creator Pym mere moments after being created, quickly deemed humanity as flawed and has made numerous attempts to wipe out the entire race. He attempted to destroy any of his own creations, such as Vision and Jocasta, when they rebelled against him.