But “going to court” rarely happens. 95% of cases are plea-bargained.
https://www.law.cornell.edu/wex/plea_bargain
Given overwhelmingly evidence and an overworked public defenders office, you’re not going to take a chance on going to court where you will probably lose.