You and others might find this article called "A New Theory Explains How Consciousness Evolved" at
https://www.theatlantic.com/science/archive/2016/06/how-consciousness-evolved/485558/ of interest. Here's an excerpt:
"What is the adaptive value of consciousness? When did it evolve and what animals have it? The Attention Schema Theory (AST), developed over the past five years, may be able to answer those questions. The theory suggests that consciousness arises as a solution to one of the most fundamental problems facing any nervous system: Too much information constantly flows in to be fully processed. The brain evolved increasingly sophisticated mechanisms for deeply processing a few select signals at the expense of others, and in the AST, consciousness is the ultimate result of that evolutionary sequence. If the theory is right—and that has yet to be determined—then consciousness evolved gradually over the past half billion years and is present in a range of vertebrate species."
It seems to me possible that consciousness serves more than one function, much like the throat in humans serves more than one function. Consequently, there may have been more than one reason that it evolved as it did. That is, I can see how it could have evolved to focus attention, aide in self defense, and provide or increase foresight all at the same time. The facts are that today it does all three things.