All that assuming that the final boss isn't Mr. Manhattan himself [he is the one who is constantly resetting/changing things in the DC universe every few years for his own amusement and to do as he pleases with his power.
Yeah, I own that comic and that's not what happened at all.
Basically after Watchmen, he wanders around and eventually finds himself in Earth-1, Prime, whatever, and makes two discoveries simultaneously: 1) This universe is really fucking weird, and 2) From his perspective, Superman kills him, as it's in the middle of this battle that Superman manages to connect a punch...and then he is unable to observe the timeline past that. Because of his state of being and power, he assumes either Superman did this in a straight fight or, more likely to his pride, Dr. Manhattan himself orchestrated this as (essentially) an elaborate suicide, and so begins to observe the
entire history of the DC Multiverse to figure out what the hell is going on, and decides to experiment by changing the timeline
once by removing ten years from history...and discovers that the Earth he landed on isn't so much a Universe, but a Metaverse, and that whatever changes are made to this one world will ripple out through the entirety of the DC Multiverse.
Knowing this, he sets things up to be a mirror to what happened on the Watchmen Earth in an effort to see what can be done...and finds himself disappointed with the results about halfway through, seeing them going down the same road. Depressed, he only starts lashing out when the people of this Earth start pushing back at the changes he made, thinking him the Ultimate Villain even though all the man wants is to know
why this world is different, why its existence dooms his own. It's only when Superman finally connects, that fateful punch that should have spelled doom for Manhattan that he realizes the why.
It's Superman.
Superman, Humanity's Greatest Hope and Everything He Is Not, is the source for all the state of the Multiverse, as this Cycle revolves around the Hope he brings, a Cycle that is Fated to repeat until Humanity Is Ready (in presumably the Legion's Future).
With this understanding, he starts putting everything right and returns to his Earth with a young child in tow, a child he raises and molds to be Dr. Manhattan's Better, the Superman That Is Clark Kent, and when he feels that the boy is ready has him live with his old friends, as he himself passes into Oblivion to save the world he failed.
While there's a lot more to unpack (the series was
super dense), this is the basic just of it.
TLDR: Dr. Manhattan got curious and learned something about himself, that he wasn't right for the job and raised up his replacement, but he didn't set out to be a dick.