Her accusers, instead of focusing on prevention of this woman's sin, used entrapment with planning to use this as a snare in which to attempt to trap Jesus.

What would Jesus do? He could:
1) Refuse to pass any judgement = woman would be stoned.

2) State that she should not be stoned = he would then be accused of not observing the law.

So it seemed to them to be the fooproof trap. How astonishing to the humiliated woman when her accusers, seemingly embarassed - all left one by one, ultimately leaving nobody to accuse her.

Who got trapped ultimately? The truth literally set her free.

John 8:3