That sequence in 'Revenge of the Sith' still hits like a gut-punch for me. On the surface, the canonical reason is straightforward: Palpatine had fully turned Anakin to the dark side, and Anakin believed that wiping out the Jedi was both necessary and a proof of loyalty. More specifically, Palpatine manipulated Anakin’s deepest fear — losing Padmé — and promised absolute power to prevent that loss. That fear warped his moral compass until he accepted that any atrocity could be justified for the 'greater good' he imagined.
Beyond manipulation, the temple attack was a political and strategic move. The Jedi represented an institution that could rally opposition, train future opponents, and undermine Palpatine’s rule. In Anakin’s mind he wasn’t just obeying an order; he was cutting off the seeds of a future threat by destroying the younglings who embodied the Jedi’s continuation. The novelization and subsequent canon materials make it clear he also wanted to burn the bridges behind him, to sever any hope of returning to the light. It’s brutal and heartbreaking, and for me it’s the clearest moment where the tragedy of his fall becomes irreversible — a reminder that fear and conviction, when twisted, can do monstrous things.