If you're only familiar with the film's version of Ultron, then you may be shocked to find out the origin story is slightly different. What?! A movie taking liberties from the comic book?! MY WORD! In the film, Tony Stark creates Ultron (with a little help from Bruce Banner), but in the comic book world, Ultron is created by Hank Pym, Ant-Man. That's right, Ant-Man. Though in the movies Hank Pym is the creator of the Ant-Man suit, not Ant-Man himself.
Hank Pym made Ultron, imbuing it with his own personality. The only thing is that Hank Pym isn't a stable dude, so neither was Ultron. Combine instability with intelligence and you get a nasty robot hell bent on destroying humanity. Ultron has a point though. Humanity does kind of suck. Let us kill ourselves though, Ultron. We're doing a good job at it.