15When they tried to overthrow the government
Sure, Palpatine was a bad dude. You might say he was the worst dude ever. However, that hardly justifies the Jedi staging a coup upon discovering that Palpatine was a Sith.
When the Jedi Council learned of Palpatine’s true identity, they immediately sought to remove him from office on their own, despite the
fact that he was an elected official.
In attempting a unilateral government takeover, the Jedi played right into Palpatine’s plan. It was the very excuse he needed to bring his admittedly evil plans to fruition and rule the galaxy.
Palpatine’s Empire eventually became a more oppressive entity than the Jedi ever could have been, but that's certainly no rationalization for the way they tried to take him out.