Not to defend Polanski on this, but he did go to court, he worked it out to a plea bargain, then before he was to meet to finalize it in court (several months after the initial arrest and plea bargain) he was tipped of that the judge was getting his hand forced to hand a heavier sentence to him.
http://news.bbc.co.uk/2/hi/entertainment/2793465.stm
Even the victim states that his work should be judged on its own merits and not on previous incidents.