"Master, this woman was surprised at the very fact, committing adultery. Now, in the law, Moses commanded us to stone such women. You, what are you saying ? They said that to put him to the test, to have a motive to accuse him." Read John 8. 1-11
The scribes and Pharisees are called hypocrites six times in the only chapter 23 of Matthew's gospel. They are obsessed with wanting to trap the Lord, either to disqualify him from the people, or to accuse him before the Roman tribunal (John 18:31). They build up puzzles hoping that, whatever Jesus answers, he will be caught out. In the present case, the ambiguity of their question suggests that they speculated that the Lord would advise them to pardon the adulterous woman. In this case, it would have been nice to accuse him of transgressing the divine law, which would have disqualified him to present himself as the Messiah. If, on the contrary, Jesus recommended stoning, his vocation to come near in favor of sinners and his mercies would be immediately denounced as a hypocrisy that would discredit him with the people.
Silence is therefore first and foremost the answer indicated in such a case, especially since it is accompanied by the curious attitude of Jesus to write on the ground, as if he were deaf at the request of the Pharisees. Such unexpected behavior could have led them to suppose that the Lord, having discerned their perfidy, judged them unworthy of an answer. But, as in their obstinacy, they persist in questioning him, Jesus gives them this masterful reply : "He who is without sin, let him first cast the stone against her." They retire one by one with their mouths closed (Rom 3:19). Then, Jesus offers his grace to the sinner convinced of sin not without formally committing it to the future : "Go, henceforth do not sin anymore".
Faced with the perfidious cunning of enemies who do not give up any trap to arouse against it the hostility of the Jewish people and the Roman occupier, the Lord reveals by his wisdom and grace a total control of the situation. Thus he teaches the Pharisees that the authority to judge the sinner belongs only to Him alone ; He then teaches them - as with us - that his priority in coming among them is to save from their sins these same sinners, such as an adulteress (Romans 2,1-3, 8,33, John 3: 17; 12. 47).
Source (Pleasing the Lord)