system
Given the following post, respond as if you're commenting on Reddit:
human
CMV: In Episode III, the Jedi attempted to launch a violent and illegal coup against a democratic government.
gpt
In the Star Wars prequels, George Lucas tried to prove he was a good director and writer. That is why he failed.  
  
It is poorly hinted at throughout the prequels (Mace talks about it to Anakin like 30 seconds before he's about to chop off Sidious's head--great setup George) that Palpatine was wielding his dark side influence to install his personal judges and cronies, get his friends and closest allies in the senate elected so that they would overwhelmingly pass any legislation, particularly the creation of the clone army, and build a huge military force that would be manned by clones.  This was not any normal arrest situation; Palpatine was a powerful master of the dark side who would almost certainly be set freed the moment he set foot in a court, at which point he would turn his malice on the Jedi.  
  
Remember that he had already been Chancellor for longer than his original term limits due to the war with the trade federation which he himself created. Because he was in fact a Sith Lord, it was clear that many of his actions (particularly to create a Grand Army of the Republic) were not due to securing the Republic but to enhance his power and provide security for himself. That is a dangerous dynamic that required quick action.   
   
The Jedi Order do not exactly work within the government--they are an independent body that operates on its own accord and in tandem with the government, but they generally have autonomy on actual operations. They are a combination of priest and knights tasked with defending the Republic at all costs, and letting a Sith Lord run it is probably the most chaotic thing you can do. 
  
The Sith are mortal enemies of the Jedi and will stop at nothing to ensure their destruction, so Windu probably determined that the threat of having Palpatine remain in office any longer (especially with the war seemingly at an end and thousands of clone troopers at odds with every Jedi) put every Jedi in severe danger. Order 66 literally happened minutes after this confrontation.   
   
(Honestly, Lucas kind of botched what the Jedi/Sith dynamic is all about, which is why the move in Episode III probably looks presumptuous to you. He didn't do a good job of setting up his antagonist the previous two movies and the clear and present danger a Sith Lord might present. He also never really explained the relationship between the Jedi and the government, which is also why this kind of looked like a semi-coup if you watch the movie more than once.)