Good question!
First, let’s examine mutations. They are random: Some are good, some are bad and some have no effect. Mutations that allow someone to live easier should also mean that person can procreate more. The mutation is handed down to the offspring.
Second, mutations are slow for the most part. Many generations have to live and procreate to make that mutation a part of the general gene pool.
Thirdly, complexity. One does not create an eye, say, overnight. First you have a cell or cells that responds to light. This might help the simple lifeform survive than those with out. Next, a number of cells might become photosensitive. Eventually, after a long time, you get the complexity of a human eyeballs. Unlike the claims by creationists that the eye is too complex to have been anything less than a god, the eye has been independently evolved 5 different times. As above, it happens slowly.
That brings us to the mind. The same argument applies here. The more connections a brain can make the greater the possibility is that that brain will let its owner survive more than those with smaller brains.
And, finally, here comes the really cool stuff, IMNSHO. The human mind processes so much information that the brain had to evolve consciousness once the information flow is so high. Those that can say “If this happens then that happens and then my mammoth will be dead” is infinitely better than, say, someone who can only make observations: “Fire bad!”
The ‘if/then’ statement above is incredibly powerful. Our brains continuously tries out new ‘if/then/ possibilities. In effect, we are creating fictional stories that we then evaluate for truth. It probably starts with something like: I ate a red berry and I killed a mammoth, they must be connected. When the next day you don’t kill a mammoth you throw out that if/then (hopefully) and try something new.
Your brain does this all the time during dreams. Not very practical in some ways: dreams are like garbage collection. We bring up various memories (often triggered by what you did in the last few days) which then gets weight depending on whether we need that information or not. The stuff that isn’t gets thrown away or thrown into a mental ‘garbage pit’.
And now we can make the case for rational thought. The rational person has a much better chance of surviving. She gets to spread her genes around and, over long time, it becomes part of the collective gene pool.
I see the ‘if/then’ process as a story writing itself.
Keep in mind, being rational may not win in all ways. The history of the human race is littered with virtually non-stop killings based on irrational concepts. One of the big fears is that one irrational person will start WWIII by pressing the button to launch nuclear weapons.
However, barring that, the rational may soon indeed win out.