When you first saw EP3, the scene of Palpatine's purge of the Jedi was shocking. You wondered why the clone soldier, who seemed to have such a close and trusting relationship with his superior, the Jedi, would suddenly betray him. It's no exaggeration to say that Lucasfilm set out to make The Clone Wars to answer that question. It was portrayed in the retaking of Ambala in Season 4.
The 501st Battalion, led by General Skywalker, fights on the planet of Ambala, which is crucial to the Republic's military advantage. However, Skywalker, sung as a fearless hero, is recalled to Palpatine on Coruscant en route. In his place, Jedi Master General Krell will lead the 501st Battalion. As they say, he is strict as a superior officer, and some soldiers begin to complain. Some believe that Skywalker's strategy was too good, but it was probably due to his disappointment with the Krell's reckless strategy. In fact, the Krell considered clone troopers to be soldiers like droids.
As a result, many clone soldiers die in battle. The surviving clone troopers plan their own mission without telling the Krell. They imitated the legend of Skywalker's boyhood. That is, they tried to destroy the droid's command post and cut off enemy communications and supplies.
The plan worked, albeit at a cost. However, the Krell, sensing this, decide to detain and court-martial the clone soldiers who took part in the operation on charges of disobeying orders. Inspired by this, and concerned that other soldiers might follow suit, the Krell, as their superior officers, attempt to have the firing squad executed. In the end, the firing squad was not carried out. Later, the Krell ordered, "Enemy soldiers wearing clone armor attacked us, stop them. They fought, but the 501st Battalion realized that the enemy soldiers were also clones. The Krell issued the same order to both sides, forcing them to fight each other. Enraged, the clones decided to deprive the Krell of their command. The Krell are then detained. Later, the Krell are executed.
Thus, there were indeed Jedi who could not establish a relationship of trust with the clones. In addition, the Jedi, who were at peace until the war broke out, lacked the leadership skills to lead their soldiers.
Since Count Dooku of the CIS was a former Jedi, rumors were whispered among the clone soldiers that he was a Jedi.
"The Jedi are prolonging this war, aren't they? Aren't we just being used to militarize the Republic? As long as the Jedi continue to fight the war, can you put up with more of your people dying again?"
Thus, the disgruntled clone soldiers honestly carry out Order 66.
"Apparently, four Jedi attempted to kill the Supreme Commander on Coruscant. Palpatine was ordered to kill all the Jedi as treason. Apparently this war was orchestrated by the Jedi and Dooku!"