This passage needs to be read very carefully. For me it speaks volumes about how over the millennia 'sex sins' have been dealt with as a special category, particularly grave. The story wouldn't have had the same effect if the woman had been caught shouting at her mum and dad, a sin which under Old Testament law carried the same capital punishment Leviticus 20:9. Jesus quashed this idea of black and grey sins with his response of letting the crowd rage in righteous indignation and then quietly asking which one of you lot has never sinned? Then the penny dropped.
The woman doesn't repent in the story and Jesus doesn't forgive her sin, whether that happened outside of the story; we'll never know. He gives her advice; sin no more. Sin no more as opposed to, just pack in your boyfriend. Jesus gave her opportunity to repent; whether she took it, we're not told. Had he gone along with the lynch-mob that woman would have gone straight to Hell; something that God doesn't want for anybody. Note also, Jesus was not being light on adultery, see Matthew 5:27-29, far stricter than any of the Pharisees. Jesus was saying that the time wasn't right for Him to judge and condemn John 12:47. What this passage tells me is that we shouldn't look outside of the Church and wish for God to bring forward His judgement, rather we should reach out rather than pick a fight. My heart sinks when I read of Christians in court accused of breaking homophobic hate laws, wedding cakes, B&Bs.
How would this story have played out if the woman had been a man caught in the very act? Would the outcome have been any different?