We are going to die, and that makes us the lucky ones. Most people are never going to die because they are never going to be born.
The organism learns not only what to do but also what leads to what.