At the time you were allowed to bring the girl's sexual history and "intent" for the encounter into evidence.
The girl apparently had an extensive sexual history and was brought to the house by her mother who told her to do anything she had to do to get a part in one of his movies.
Now, it's seriously unfair, but at the time, it's entirely possible that Polanski could have claimed he was set up by the girl and her parents for blackmail/civil suit purposes and got at least one member of the jury to buy it.
That's why the prosecutor's office was willing to plead this down to unlawful sexual contact with a minor instead of Rape One.