If obeying thermodynamics count, then it counts as a goal. There's a theory that life (and thus evolution too) exists to better dissipate energy.
"England’s calculations suggested that groups of atoms that are driven by external energy sources can behave differently: They tend to start tapping into those energy sources, aligning and rearranging so as to better absorb the energy and dissipate it as heat...
England sees life, and its extraordinary confluence of form and function, as the ultimate outcome of dissipation-driven adaptation and self-replication."