Well, at the end of AotC, Anakin had killed in anger (Tuskens), duelled in anger (Dooku), and married which was against the Council's mandate of 'no personal attachments'. He was being selfish, and did not seem to see that his actions were more self serving than a Jedi's actions should be. As for Obi Wan at the end of TPM... Obi Wan didn't have to turn around and take part in the Clone Wars right after he killed Maul. Anakin's agressive personality was fed by the galactic conflict and personal manipulations of Palpatine. Obi Wan, on the other hand, had enough time to see that killing in anger was wrong.