Natural selection from random mutation, guided by epigenetics and emergent self-reinforced usefulness (emotional stochastic pattern optimization).
Consciousness is nature’s emergent ability to predict and be proactive against entropy. Humans were the first (Earth?) species with the chance to choose whether we go extinct or not.
So far, we’ve chosen poorly.
“I can see it. It’s imprinted on the earth man’s brainwave patterns.”
“He’s just making that up.”
“Making it up? Why would I be making it up? Life is horrible enough without making any more of it.”
-Arthur Dent and Marvin, “The Restaurant at the End of the Universe”