Jedi, like all institutions, have their faults. However, that’s usually a secondary concern to bring up when talking about them. They have lightsabers and can use the Force; they’re cool, okay? But, as stated above, they had significant issues within their leadership, their decisions, and their complete inability to foresee the growing darkness in Anakin Skywalker and the Dark Side. One of their many mistakes was banning Ahsoka Tano from the Order, and it was for the worst reason.
The public didn’t trust Jedi anymore, even before the temple bombing
In the last arc of Season 5, the Council sends Ahsoka and Anakin to investigate a bombing at the Jedi Temple on Coruscant. At first, it seemed to be a suicide bomb but was the result of a woman named Letta feeding the bomb nanodroids to her unsuspecting husband. It all turned out to be a plot by Barriss Offee, another Padawan and supposed friend of Ahsoka.
However, Ahsoka was framed by Barriss for the attack and killing Letta. Tarkin, an Adjutant General at the time, was deadset on Ahsoka paying for the crime, even though they didn’t have sufficient evidence that she planned the bombing.
Since the bomb happened in the Temple and many people — Jedi, workers, and Clones — died, the distrust and disdain for the Jedi was growing. It was already festering, however, the bomb brought it to the forefront. There were protests, and the Jedi were in a precarious spot; if a Jedi had bombed the temple, they would face even more scrutiny.
The Jedi Council was trying to save their necks
This brings in Ahsoka’s trial with the Jedi Council. Even though the Jedi wanted to put Ahsoka on trial with only them, Tarkin insisted that the Republic courts take charge. Ahsoka’s trial with the Jedi would decide how they were going to proceed.
To save their necks, the Jedi Council voted to ban Ahsoka from the Order. This meant Ahsoka would be put on trial in front of the Senate and Chancellor as a non-Jedi. That was purely the only reason for doing this, which is why Anakin was so upset when they shared their verdict. They had no plans of letting Ahsoka leave their meeting still Jedi; stripping her from the Order was the only way to maybe get their credibility back with the public. They were, of course, wrong.
It backfired because they had the wrong Jedi on trial
As we all know, Ahsoka didn’t have anything to do with this, Barriss did. It was at the last moment during the trial that Anakin showed up with Barriss. She confessed she was the mastermind behind it all. The Jedi Council not only turned their backs on Ahsoka — who had only ever been loyal to the Order — and tried to cut their losses by banning her. In actuality, a Jedi was still charged with the crime, and they banned Ahsoka for nothing (go figure).
In her last moments in The Clone Wars, Barriss makes a charged statement about why she did it. She said the Jedi were “responsible for this war,” and they’ve “lost [their] way” so much that they’re the villains. “My attack on the temple was an attack on what the Jedi have become: an army fighting for the Dark Side.”
While the Jedi were never the Dark Side, their clouded judgment and interest in saving face led to Ahsoka’s expulsion and their eventual decline. Ahsoka chose not to stay with the Jedi, and we all know that Anakin was really shaken by this event, breaking his trust with the Order further.