It's not 'why could they not', it's 'why would they not'.
Generally speaking, they kept the letter of the law. What they failed so miserably at was being on the inside what they appeared to be on the outside. They didn't commit adultery, they lusted. They didn't steal, they were greedy and tight-fisted. They didn't murder, they hated.
Most likely, Jesus wrote other commandments of God in the dirt that convicted the 'righteous' Pharisees of his own guilt before God. Actual adultery just wasn't going to be something you could nail on a Pharisee. That is the comfort the Pharisee had, imagining himself righteous before God. Start talking about coveting, and greed, and hatred and you've got a case against a Pharisee.....if they hang around long enough to listen to what you say.