In the Star Wars franchise, Order 66 is a directive ingrained in every clone trooper to eliminate members of the Jedi Order, but some Clones managed to disobey the order. In both canon and the original Expanded Universe (also known as Legends), clone troopers, no matter their rank and training, were human beings at the end of the day, and thus, through supreme acts of will (and help from non-clones), many were able to overcome their conditioning and refuse to murder their Jedi allies.
Unfortunately, no matter how many clones disobeyed Order 66 in either continuity, the Republic still became twisted into the Galactic Empire and the Jedi were still brought to near-extinction. Order 66 was ultimately the true purpose of the clone troopers. Darth Sidious, Count Dooku, and, in part, even the clones’ genetic template Jango Fett, created the clone army for the specific goal of destroying the Jedi Order. The tragedy of the clones in both timelines is that they were fundamentally good, individual, men who gradually conquered their programming, except for the one, sinister, task they were made to perform, in most cases.