I think that the path of least resistance underlies everything. This means that every niche that exists is occupied/explored/felt out. In an existing multi-layered environment, sooner or later this leads to complex energy exchanging systems/structures, which are called living because of their dynamics. The sun provides the energy supply to keep the structures under (energy)current (pressure), respectively has "provided" with fossil (energy) storages. Everything is in flow.