Bottom line:  given that there were no other witnesses, this was at most a "he said, she said" case at best  - and a very old one at that, the successful prosecution of which almost demands an unimpeachable accuser, which Andrea Constand was most certainly not.

It's arguable that the lead prosecutor's political ambitions were at least as important a motivation for trying Cosby as any quest for true justice.  C'est la vie.