Evolutionary processes consist of:
1. A starting population
2. A method for reproduction and variation
3. A fitness function, whereby members of the population which better match the fitness function are more likely to reproduce.
Under these conditions, evolution only attempts to maximize the fitness function. But this often produces complex and sometimes unpredictable side effects.
Survivability and reproducability are all that really counts. And yet, attributes such as diversity and complexity will often emerge as side effects of this drive to maximize the fitness function, even if they are not directly expressed in the fitness function.