Liberal, above, is definitely on to why this sequence of events you give is lacking.
The brain does a lot of things automatically. Some of them are quite complex too. Some things we do consciously at first, can become automatic, unconscious behavior later. Some behaviour we do automatically and give conscious explanations for afterwards, which sometimes are demonstrably not even true.
I believe that consciousness is only a small, small part of the biological computer, more of an interesting side-effect, if you will, than a fundamentally integral part of the system practically equal to the system itself. I’ve given this some serious thought back in the days that I studied Artificial Intelligence, and came up with the following conclusion, which I’m now basically still waiting to be proven or disproven by science.
First of all, I assume we are a biological computer and purely physical. There is nothing, in this world, that gives me any impression of this being otherwise.*
Evolution went from small, simple, direct things to increasingly higher levels of complexity - more complex forms of interaction, procreation, memory, replication, etc. Things have evolved.
Simple beings receive sensory input to which they react directly. The difference between a thermometer and a coral is quite simply that the thermometer was created, and the coral recreates itself. I see absolutely no reason to bring awareness in at this level. There’s no reason for a coral to be more aware than a thermometer - both interact in similar ways, but the coral does learn and evolve, and recreate. The thermometer does not. This is what makes the coral more alive than the thermometer, or the coral alive and the thermometer not (depending on a progressive rather than absolute definition of alive)
From the coral we can move on to more dynamic memory, which allows us to remember that red things hurt us and green things feed us (for instance birds eating different insects). We remember a color and a sensation, and the next time we see the color we remember the sensation.
The more directly linked the experience becomes with the memory, the more we appreciate Pavlov’s research. This is why experience and memory are easily linked, and it’s tempting to make them equal. One of the questions posed here is if they are. I’d say they are not quite, but can be very similar, depending on the complexity of processing being done.
Let’s look at this again:
I have a feeling it’s not quite that simple. Brain activity is registered as a wave of electricity passing and strengthening existing paths and sometimes forming new paths altogether (brush, sweeping, etc). When we grow up we experience rapid random growths of neurons and pathways in many areas in the brain, which are at that point extra susceptible to new path forming. Hence part of the reason why we can learn certain things better in our youth (brush, sweep).
Bringing Pavlov back into it, let’s say that a dog smells meat and starts salivating. There’s a neural pathway that leads the triggered electrical stimulus from the sensory input to the part that stimulates glands to start producing saliva. Now we ring a bell each time we present the meat. Because the two stimuli occur simultaneously, the brain forms a pathway linking these two stimuli - how exactly this works I’m not sure but it is clear that we are rigged to respond more strongly to combined impulses, so pathways linking these are formed quickly and easily in the brain. Now the bell rings by itself, and sends an impulse through the pathway that links the smell of meat and producing saliva, and saliva is produced by virtue of hearing the bell all by itself. Interesting examples of this process happening is when you see a guitar player moving his mouth while playing.
So far it’s simple. But a vast number of connections (bilions) can form in the brain that are triggered and channel input and output in incredibly complex ways. Some paths form quicker and regress slower (what input they require before activating), and vice versa. But what is clear is that they can, like computers (actually the other way around of course), form complex patterns that allow incredibly complex ways of combining sensory input and physical reaction to that sensory input.
We go back to the bell. This incredibly complex pattern can form all sorts of represenations of the sensory input of a bell, most of these linked to a bell. This complexity can cause us to think of a bell in more and less predictable ways. If we were, however, trained to associate a bell with the smell of read meat, and our salival glands were as strongly asociated with that smell as in dogs, we would often send a stimulus to our salival glands when thinking of a bell.
Does this mean we’re slaves to input, just really complicated reactionary machines? Yes, we are. But why don’t we seem that way? Obviously, the complexity is one. But I think another one is that energy can travel through these pathways without sensory input altogether. Here we may think that we control our thoughts, but the energy will go to the paths most easily stimulated whether or not the energy is mostly circular or whether they are caused by sensory input.*2 After all, we remain a product of our experience and DNA.
Some of the interesting programs we develop is the concept of self, and self-reflection. It forms from observing and starting to symbolize yourself, from seeing your hands, seeing yourself in the mirror, distinguishing yourself from other people like you, learning about your own sensory input and memories, learning language in which you use your own name and I and you forms, and so on. In a sense, you get memories of memories, if you will. You start identifying and remembering some of the patterns in your head. Before you know it, there’s a complex pattern in the brain observing the complex patterns in the brain, and you’ve developed a consciousness, you’ve become self-aware.
Perhaps dreams are the best way of illustrating some of this at work. There’s a distinction we can make between dreaming, sleeping without dreaming, and being awake. It is The different aspects of the brain we’ve discussed is reflected in these three states. When we’re sleeping our deep sleep, our brain regresses to a very low level of activity. We are not self-aware at this point, there is little sensory input being processed, but we are not dead. If we dream, sensory input is still hardly being processed, but the brain activity rises to near awake state. The effect is that because partly because in this sleeping state we don’t really process sensory input, but the level of brain activity has risen, the internal programs are being stimulated anyway. The difference is that this time the preferred pathways are followed with less interference/distraction from sensory input, and so it becomes less rooted in direct reality, and much more driven by memory. The REM during this dreaming part of sleeping coincides with the activation of the visual memory similarly to the saliva and the moving mouth of the guitar player. The program in our brain that observes all this going on is also active at this phase and can therefore again make memories of these reactivation of memories, and because of that we can remember dreams.*3
I’ve tried not to turn this into a book and if I’m going to explain my view on this in more detail, I’m afraid that’s exactly what’s going to happen. So I leave it at that and see what all this triggers in your brain. 
A.
- After all, every thing we used to ascribe to supernatural causes has been ending up in the dustbin, and not the other way around. I’ve often suggested (mostly to myself) that superstition or religion is that which we desperately want to explain but can’t. It has definitely helped some of us to avoid learned helplessness, which psychologists now is a good thing.
*2 I mean all sorts of input to the brain here, including hormones and such released by organs and nervous systems.
*3 Notice that this theory is supported by dreams, like fantasy, never really containing anything new, always being constructed of memories of things we experienced earlier.
