Maxwell's Demon
Imagine a coke bottle gets opened in a sealed room. Gas escapes the bottle and spreads across the room. That is the thermodynamically appropriate state of affairs. Those molecules are not likely to end up all convened back in the bottle.
However, if a little demon lived on the bottle top and this demon grabbed the gas molecules that were in the bottle and leaves those that weren't and procedes puts these gas molecules back into the bottle, while simulatenously preventing the release of any gas molecules from the bottle, then eventually the bottle will be filled with all that gas, despite the thermodynamic absurdity of this happening without the demon.
Maxwell proposed that a selective entity could create a system in which that which seems thermodynamically improbable, turns out to be inevitable. This does not break the second law though - since the demon has to do work to be a selective entity. That work is not 100% efficient, some energy is lost as entropy.
Evolution has a selective entity. It is called natural selection, and the theory of evolution describes it. It describes natural selection as an inefficient system - a lot of energy and inefficient work goes into creating babies, and those babies growing and eating and so on, and not all of them survive. It is a very wasteful process and the end result is a hell of a lot of entropy increase in the universe.
Evolution is not a perpetual motion machine, cut of its power, and it runs out of steam.