I don’t know why or how life evolved from nonlife. Other self-organizing systems, like heat convection or atmospheric currents, are dissipative structures that accelerate the production of entropy in far-from-equilibrium conditions. Organisms do it too, maintaining their negentropic functions by using free energy from their environment, thereby accelerating overall entropy. Maybe that’s what organisms are for: to accelerate the inevitable heat death of the universe. Certainly humans are highly efficient entropy production systems, using not just their own bodily metabolisms but the artifacts they create to suck free energy out of the universe, replacing it with waste, exhaust, and other entropic byproducts.
Regardless of how and why they came into existence, organisms do maintain and reproduce themselves. Organisms that through random mutations achieve incrementally better abilities to obtain access to free energy and to metabolize that energy are more likely to survive and to reproduce. A bacterium doesn’t have to have intentions motivating it to waggle its flagella in search of sunlight and nourishment. A bacterium is a self-organizing system: it spontaneously perpetuates its own equilibrium by means of genetically encoded drives that are sensitive to indicators of environmental energy sources. Presumably it’s cause-effect all the way down.
Suppose the environmental sources of metabolic energy — food — available to an organism are uncertain, quantities are limited, and access is difficult. If following its genetic program the organism pursues an unfruitful path toward food, it will die. Suppose this organism carries a set of mutations that permits it to evaluate the relative likelihood of finding food by pursuing different uncertain trajectories. Suppose the organism is further mutated such that it is able to identify and work around obstacles standing between itself and the food source. These mutations would be adaptive, enhancing the organism’s survival odds, if the extra energy expended in the exercise of its mutated food-finding abilities are more than offset by increased access to sources of energy replenishment.
This whole mutated apparatus is still following straight cause-effect, motivated by genetic instincts attuned to environmental affordances. There is still no need to invoke intentionality. Even if through more mutations this organism became aware of its own enhanced food-finding capabilities, the self-awareness does not imply or require intentionality. I’m aware that I’m presently digesting my supper, but that doesn’t imply that digestion is the result of my intentions.
What if some further mutation occurred in which the organism does achieve intentionality? This mutant creature plans for its next meal even when it has no immediate need to replenish its energy stores, even when there are no signs of food being present in the organism’s immediate environment. Would this mutation prove adaptive? The same conditions are in effect: if intentionality works, and if the exercise of intentionality more than replaces the calories it burns up, then it should enhance the organism’s survival. Is intentionality a straight-ahead cause-effect mechanism? I think it would be better to regard it as a mechanism that anticipates cause-effect based on prior experience — a temporal feed-forward loop. Intentionality is predicated on the anticipated desirable future effects of causal mechanisms that the organism itself puts into operation: if I cause myself to go to the watering hole, this action will probably result in my finding some food there; if my speed covering the distance to the watering hole causes two hours to elapse, then as a result I will probably be hungry by the time I arrive there.
Another mutation: the organism becomes aware of other organisms’ techniques for finding food, whether those techniques are intentional or not. This organism observes a creature locomoting in some direction and infers that the creature is on the trail of some food source; it then follows the creature in search of its own food. It observes a creature evading complicated obstacles to obtain food; it imitates the other creature’s behaviors and secures its own food. This organism would need the sort of intentionality that enables it to infer that the other creature’s motivated behavior is relevant to its own motivations and therefore worth imitating as a cause that will likely generate a desired effect. Adaptive? Same rules apply. Cause-effect? The feed-forward loop of intentionality is augmented by a feedback loop of observing and imitating others’ behaviors.
In short, intentionality can be built incrementally on unintentional survival mechanisms without transcending cause-effect, and intentionality offers survival benefits if it isn’t too much of an energy drain to operate.