He was acquitted because it was the wrong charge, not because it was legal.
He was charged with sexual assault, which the judge ruled was nonsense. Afterwards the prosecutor admitted that disorderly conduct would have been more appropriate, so in future cases that would probably lead to a conviction.