As the last two seasons of Star Wars: The Clone Wars reveal, many clones are quick to follow Order 66 because of inhibitor chips in their brains. These chips erase any existing biases or beliefs, including ones about Jedi comrades, and enforce total obedience.
Jedi Master Sifo-Dyas, who commissioned the clone army for the Republic, gave the Kaminoans, who create the clones, the original control chip. The chips initially make the clones less aggressive than their template, Jango Fett, and act as a safeguard against renegade Jedi. After Darth Sidious and Darth Tyranus (or Count Dooku as he is more commonly known) have Sifo-Dyas killed, however, they take over the project and keep the inhibitor chips a secret from the Jedi Council. The two Sith Lords also lead the Kaminoans to continue believing that the chips are a contingency plan against renegade Jedi.
These behavioral chips are extremely hard to find, as they are microscopic in size. In the Clone Wars episode "Conspiracy," for example, a clone named Tup's chip is only found after the medical droid AZI-3 performs a level five atomic brain scan on him. Additionally, the second-to-last episode of The Clone Wars shows that former Jedi Ahsoka Tano cannot find Clone Commander Rex's biochip with the standard medical facilities onboard a Venator-class Star Destroyer, until she uses the Force to locate it. Who knew that a device this small could cause a major galactic catastrophe?