Asking 'think' is probably the worst wording to make...Sometimes the wording is a really touchy thing all on its own.
Well, quite simply, it's instinct. We in some way express to ourselves mentally a realization of a desynchronized state of our sex "is" compared to what literally is our sex. (sort that out however you want) Of course it's vague, but that's what makes transsexualism pretty hard to pin down in the first place.
As for people who bad-transition, I feel that they're cases of internal dishonesty. They look outwardly to define who they are rather than internally, and by doing so may 'realize' they are the wrong sex...yet they never actually have felt they are the wrong sex.
All-in-all, I agree with one of the earlier posts. This is an extremely devoted path, so I doubt the fequency is honestly frequent, unless if you count canceled transition processes. Plus, these people who "suddenly" realized probably understood already, but were just thinking they could do it anyway.