First of all, consciousness is not a light switch, we have to accept its granularity, that some beings are not fully conscious. As far as explanation, our understanding of human like conscious as being 100% is just a byproduct of our massive brains and ability to import knowledge from being before us. If a person is born and never interacts with any humans ever, I believe that which would have been consciousness is wasted, they would not have learned to be self aware.
Deeper still, consciousness links us to the zero point dimensions of space time. Where physical properties have no translation, and we are inherit gods. This is where we go where we sleep and dream, completely unbound by body or any limitation, yet experiencing the full sensations of reality.
Another property is consciousness is that since we aren't bound by space time, we can walk along it, fast forward and have premonitions, rewind and experience past events. This is what high levels of consciousness allow.
In short, why do we have it? Because our brains allow it. Why do we have brains that allow it? Instinct and self breeding of the human race to survive lead is to acquire an advantage over other species and animal. What we do with it is exploit reality to our advantage. Nature made a monster, one capable of identifying nature itself and not being bound by it.
All IMHO