In the Temple, Jesus was speaking to a crowd, and suddenly the Pharisees interrupted by throwing a woman at Jesus's feet, speaking to Him of her adultery, Moses's law, and concluded asking what He has to say on the matter. Still sitting, Jesus bent over, and began to write on the stones of the porch, covered by the dust raised by the wind. The Pharisees called him a fool (just as you are calling him stupid now), and repeated the woman's sins, demanding He speak, but Jesus continued to write. As the fresh accusers were speaking, He wrote over and over successively:
"Desecrator of the Law"
"Unworthy husband and father"
"Rebellious to God"
Once more, they demanded His opinion because she was to be judged, and added personal insult to her. Jesus stood up, staring into the crowds with searching intensity, one by one. Those who were stared at tried to withdraw into the crowd to hide. He finally spoke: "If there is one of you who has not sinned, let him be the first to throw a stone at her". His eyes searched, penetrated, and accused, as he awaited.
The people present started to go away with lowered heads, and not only the scribes and the Pharisees, but those who were previously around Jesus, and others who had approached Him to hear His opinion, and the sentence, and both the former and the latter had joined together to abuse the guilty woman, and demand her lapidation. Jesus was left alone with the apostles Peter and John, and while the flight of the accusers was taking place, He resumed writing:
Sepulchres of rottenness"
"Enemies of God"
"Revilers of His Word"
When the court was completely empty, and there was solemn silence, He raised His head and looked. His countenance sad, but no longer angry. After He sent the two apostles outside, He began to speak to the woman asking: "Did no one condemn you?". She replied sobbing, "No one, Master", and He said, "Neither do I condemn you. Go, and do not sin anymore. Go home, and behave in such a way that you may be forgiven by God, and by the man you offended. And, do not trespass on the benignity of the Lord. Go." Then, He helped her up taking her by the hand.
The Pharisees weren't concerned about justice towards the woman -- you'll notice the man caught in adultery with her wasn't brought forward. They were trying to trap Jesus so they could accuse and judge Him
. There was a lack of charity and sincerity in the accusers, and that's what hurt Jesus, not that they had lied in accusing, because the woman was really guilty. They were hypocrites for being scandalized at something they had committed numerous times, and that only greater cunning, and better luck had allowed to remain concealed.
Jesus only said those without sin should throw the stones. No one struck the woman, for no one was without sin. So, Jesus confirmed the Law that inflicts lapidation on adulterers, but also saved the woman because not one lapidator could be found. He could've stoned her to death, it would've been justice, but it would not have been mercy. And, she did not receive mercy because she was repentant, she wasn't, only dejected and frightened. Have you never felt you'd been forgiven before repenting? Now, Jesus was not foolish in forgiving. He didn't say to her what He says to souls who He had forgiven because they were fully repentant. What He gave that soul was time, and possibility to arrive at repentance and holiness, if she wished to reached them.
It is essential to possess two things to be true masters, and worthy of being masters [of souls].
The first thing: an austere life for oneself, so that one may judge without the hypocrisy of condemning in other people what one forgives oneself.
The second thing: patient mercy to give souls the time to recover, and fortify themselves.
Source: The Poem of the Man-God