Mutation, drift, selection, and environmental change all play a role. Three out of these four forces are random, without regard for the needs of the organism. Even selection can be random in its direction, depending on the environment.
So tell me. Is evolution random? Most of the processes at work definitely are. Certainly evolution won’t make steady progress in one direction without some other factor at work. What that factor might be remains to be seen. I personally do not think a material explanation will be found, because any process to guide evolution in a purposeful way will require a purposeful designer to create it. (2015)More.
It’s hard to evaluate the options honestly if design cannot be considered in principle.
See also: Researchers: Simple traits may not have simple predictable evolutionary paths Paper: This is in stark contrast to studies of microbial, viral, and immune system selection, for which evolution seems to be highly predictable (13). Why this is the case, when it is not so in organisms such as stick insects and others, is a new challenge for evolutionary biologists.