It can happen either way, I don't think anyone knows why. I like to think of it that in the dreams where you suddenly realize, you just knew for sure it was a dream. Sometimes the dream is convincingly realistic, or there is not enough evidence for you to jump to the conclusion that it is a dream, so you'll do a RC and make 100% sure that way.