Why is this shocking? Evolution itself is a learning system
It’s easy to prove that just because a process is driven by a characteristic doesn’t necessarily mean the output of that process would also. Example: when I grocery shop while hungry, that hunger may cause me to make irrational decisions, but the collection of items I buy aren’t themselves hungry.
This is also a somewhat better description of evolution than yours because benefit in excess of detriment is not a guarantee and the process is not blind (because animals breed selectively).
Hint: ML is just thermodynamics re-implemented in software.