I am not sure if this question is best suited for this stack exchange, but I couldn't think of a better one. Why do animals with brains desire things? What is the evolutionary function of desire? What is its biological purpose? I have been wondering this for some time.
Life has evolved to behave in a way that increases the chance of passing on genes. Generally, you are more likely to pass on your genes if you eat, mate, avoid predators and other risks, etc. Your body and brain have evolved to encourage you to do those things through chemical reward systems. When you eat, for example, that triggers the release of chemicals that give you a pleasant sensation, so that you are motivated to repeat the experience and avoid malnutrition. Presumably, similar processes encouraged our ancestors to find warm, safe caves to live in, to have ornaments that attracted mates and so on. Desire, therefore, is a mechanism that encourages the search for outcomes that are likely to increase your chance of survival and procreation. Today, some of those selection pressures that influenced our evolution do not apply to the same extent, but the associated mechanisms still remain.
The desire for food and procreation allow the animal to survive and replicate its genes. A lack of desire would be an evolutionary disadvantage. Excess of desire would cause risk taking and lower chance of survival. We humans have animal desires that may not be in our best interests as individuals, practically or ethically.
If you start with the premise that knowledge is not innate but desire is
Then that desire creates a curiosity to explore your environment from whence you are concieved and continue from birth.
This desire causes you the want to interact in our environment and learn that once you begin learning, you can acquire knowledge about your environment and alter your behaviour as a consequence of that knowledge and develop your conscious self.