Or He could have been doodling. He got his point across by not confronting the accusers face to face. By standing up and speaking directly he would have been making a challenge they would not accept. by speaking more informally while doodlingin the sand the accusers can one by one melt away without feeling chased away. Individually no one felt he had to “stand his ground.”
The Bible says God writes his laws in our hearts, so perhaps what Christ was doing was writing his judgments on the inward places of their hearts(as he wrote on the ground) so that when he stated “Let those without sin cast the first stone”, the accusers would be cut to the quick and would thus drop their stones and slowly slink away!
Just speculation on my part but it was a thought that suddenly had occurred to me so I shared it.
But I accept it might have been doodling. Years ago when I first saw this verse, i thought he might have been just doodling.