Nicholas Humphrey writes about Questioning Consciousness and concludes with this. Concerning the purpose of consciousness, given that it seems not to be essential to anything we do (according to him), he says:
I think the plain and simple fact is that consciousness—on various levels—makes life more worth living.
We like being phenomenally conscious. We like the world in which we’re phenomenally conscious. We like ourselves for being phenomenally conscious. And the resulting joie de vivre, the enchantment with the world we live in, and the enhanced sense of our own metaphysical importance have, in the course of evolutionary history, turned our lives around.
Spinoza was a thoroughgoing determinist who held that absolutely everything that happens occurs through the operation of necessity. For him, even human behaviour is fully determined, with freedom being our capacity to know we are determined and to understand why we act as we do. So freedom is not the possibility to say “no” to what happens to us but the possibility to say “yes” and fully understand why things should necessarily happen that way. By forming more “adequate” ideas about what we do and our emotions or affections, we become the adequate cause of our effects (internal or external), which entails an increase in activity (versus passivity). This means that we become both more free and more like God, as Spinoza argues in the Scholium to Prop. 49, Part II. However, Spinoza also held that everything must necessarily happen the way that it does. Therefore, there is no free will.
From the wikipedia entry for Baruch Spinoza.