I think the particular shape of normal human consciousness is a product of evolution, but I don't think consciousness itself is. People can experience altered states of consciousness which can be detrimental to their survival such as psychosis, disassociation, alexithymia (inability to perceive emotions of oneself and others), and aphantasia (inability to create mental imagery). Additionally some psychologists theorise that consciousness / intelligence is in fact a liability to survival because it allows us to ideate suicide as a solution to negative feelings, and that we have had to evolve mitigations to prevent this.