As I understand evolution: life has no plan, goal, aim or intention. It’s endless amounts of parallel and random experimentation over billions of years. And this has led to biological structures that have certain tendencies that work well: cells, reproduction, energy consumption, sexual reproduction. On top of that life has evolved to have behaviour and other attributes that work in certain context: immune systems, locomotion, fur, gills, adaptability, use of tools, creative problem solving.