While conciousness is a product of evolution, there's simply no evidence supporting the notion that it's anything other than yet one more unintended consequence. And the fact that its rise is dependent upon so many chance events proves that it's not a goal, end product, or in any way different from any other trait.
The consequence may well have been unintended. Certainly there is no specific evidence to say otherwise, but it is not here nor there.
The fact of the matter is, the consequence of the beginning of the evolution process resulted in Consciousness within that process.
The
NOTION that it may have been intended stems from Consciousness and Intelligence which we know DOES exist.
These two attributes allow the ability of the mindful to examine the mindless process from which it derived to see patterns in the mindless process as evidence of a mindful thing, which is where the logical topic of 'GOD' derives to explain how a mindless process created a mindful thing.
However, it seems obvious that Consciousness has to develop in specific form in order for this type of realization to come through. Simply being a dinosaur wasn't enough for consciousness to develop sufficiently for intelligence to be able to formulate questions regarding its environment and then attempt to discover answers.
Through the Human form, this happened. A curious aspect of that development was that Humans in general could see the patterns as evidence of the mindful, and could equally invent 'answers' in metaphors which served to elaborate and fanciful the more mundane and truthful "I Don't Know" answer, because it simply wasn't a good thing- even in basic survival terms - to run around saying that you didn't know.
So the metaphors became myth, the myth legend and the legend truth and when something which really isn't truth becomes truth and solidifies into dogma, well the results can be deadly at the extreme and certainly work against Conscious and Intelligent progress and development and goals - bridge building between ends and beginnings.
So the bottom line is that even that the consequence may well have been unintended, the chance events allowed for these things to happen and happen they have. The thing about the evolving complexity of Consciousness and Intelligence is that these are able to be less relegated to the whims of 'chance' and can work outside those constructs so as not to be merely at the mercy of a mindless process.
Which is a way to say, the mindless process of evolution is not 'God', should never be mistaken for being so (even that it does hold the title of 'creator') and very certainly Evolution should never be treated in a manner which would make it dogma in anyone's book.
Dogma simply isn't the most intelligent way of using intelligence.