Many years ago I heard someone speculate that Jesus was writing the names of women that these men had been with in an illicit relationship just like the woman they were accusing.
If that is indeed what Jesus wrote then it does make sense of the men leaving one at a time as they saw their own sin penned in the dirt by the finger of Jesus!
When you get into the "I'll point out your sins and persecute you for them" mode remember this story. And when your own sins have been exposed and you are standing there with Jesus alone after everyone else has gone away don't forget what Jesus said to the woman who was caught in the act of adultery.
Whatever it was that Jesus wrote in the dirt, it defused the situation and quieted the accusers who wanted to stone the woman.
The written Word of God will quiet the storm and stop the hand of the angry mob. Insert the Word of God into the next turmoil you encounter and trust God to restore His peace to your heart!
But don't forget the final words to the woman caught in adultery. Jesus said, "Don't sin anymore!" Amen