For example, as the organisms within ecosystems reach physical limits or experience competition, those with a comparative advantage a specialty naturally survive and excel. They fill narrow functional niches to which they are particularly well-suited, thus outlasting or avoiding direct competitors and helping the overall system to operate more efficiently. As the individual components so specialize, the overall system naturally comes to be comprised of a more diverse array of organisms or components, each performing a niche function with particular adeptness. This increases system energy efficiency, which counteracts entropy. And as the system becomes more internally diverse, it becomes more complex and its elements more interdependent more reliant on one another for mutual gain.
Systems gain attributes qualitatively.
Programs gain attributes quantitatively. A healthy program grows by getting physically bigger. It passes certain thresholds , after which it is qualitatively different. In a simple physical system, matter is inert. As the system evolves, matter reshapes into more and more complex forms which at first become replicating, then alive.