I have found, from my experience, that there fairly narrow time window shortly after screwing up (which can vary from seconds to days depending on the person and the screw up) where coming clean is a viable option psychologically. If, for whatever reason, you cannot confess at that point or something prevents you (physical separation, or even just an interruption that takes your concentration elsewhere for the duration of that window), or just dont realise the window of opportunity is there, thats it. Everything from that point on is making things worse and its a downward spiral in to "i cant tell because its bad, so you wait, but if you wait it gets worse, but if you tell its bad, so you wait...". During the process, especially the "wait", you will put the problem out of your mind. Its a coping mechanism. Not a good one, but it happens.