Dan Brown gave a possible answer in Origin, but not an encouraging one.
What was his answer?
Wikipedia summarizes the message of the book as follows:
Edmond Kirsch, a billionaire computer scientist and futurist, as well as a strident atheist answers the answer to the question of how life on earth came about with nature's striving for entropy. According to this, nature has developed life in order to reach chaotic states more efficiently. In addition, the inventor discovered that mankind will die out in its present form around the year 2050, because it will continue to evolve.
Humanity and technology will merge.