It's a given within the theory of evolution, that the process of evolution itself doesn't work towards any particular goal in a finite sense.
In other words, the process of evolution on Earth didn't start out trying to produce whales or mice or oak trees or mushrooms, these are just the things which happen to have resulted from the process at this point in time.
However, there still seems to be some question as to whether most evolving systems lead to an increase in complexity in a general sense. Most people would say that there has definitely been an increase in biological complexity on this planet. Even if the resultant designs were not planned, they are in general, more complex than their predecessors. But
is there really an overall increase in complexity? And if so, why?
The theory of evolution by means of natural selection says something about the survival of relative fitness, but it doesn't say anything about survival of the more complex. So why would there be an increase in overall complexity?
The following link (which is long; I'm sorry) details the basic arguments of this discussion. It may also provide the answers to the questions, or maybe just points for debate.
If you don't want to read the whole thing, then read the intro and the conclusion for a quick summary.
http://pespmc1.vub.ac.be/papers/ComplexityGrowth.html
The questions in this discussion are focused on biological evolution, but need not be restricted to this particular evolved system. The evolution of human culture as well as the evolution of technological systems (computers/networks/information systems) appear to show the same increase in complexity, though on a much tighter time line.
The article above may address the questions of "Is there an increase in complexity as a result of evolutionary systems", "And, what are the mechanisms which cause the increase?"
But it doesn't look beyond those questions to speculate on what it means in the scheme of things, if all the processes of natural evolution tend to result in an increase of complexity. What then?