Species usually evolve so that a maximum of life can exist in a given environment and every niche is filled. If two species have too close a niche, they evolve different characteristics so as to reduce competition between them. Diversity and complexity are the outcome. But they do not lead to chaos. Instead evolution weaves the wealth of species into a web of interdependence.
Herbivores eat plants.
Predators eat herbivores and each other. Plants and animals die. Decomposers recycle their bodies into soil. Soil feeds plants. And so on in self-sustaining cycles.