This has interesting connotations when related to Teshuvah. (repentance) Chazal tell us that Teshuvah allows us to undo our past actions. How do we do Teshuvah? By recalling our past misdeeds and decisively putting similar future actions out of our mind, asking God for forgiveness. According to Halachah, the necesary action of Teshuvah is recalling our past sins. If we don't confess our transgressions, then it doesn't technically count as Teshuvah.
Here the science of this article provides a similar analog. Namely, that when a past memory is being re-awakened, it can be affected as if it were a memory newly being stored. Apparently reliving a memory is similar to experiencing that event for the first time--at least as far as the brain is concerned.
So, next time you wonder about how it is that simply confessing can actually undo our previous failings, you have another thought to ponder. When we confess our sins before HaShem we are reliving the experience, only this time reliving it with our corrected sensibilities, beyond the heat of the moment, with a clearer, more objective, understanding.