This makes perfect sense from an evolutionary standpoint. Very early in natural history, there would have been a mix of attitudes toward self-preservation owing to genetic diversity.
In time, those animals that had a desire or drive to continue living on indefinitely, took less risks and cared for themselves better. As a result they lived longer and produced more offspring. Those animals that didn't have this tendency took more risks and tended to die younger leaving fewer offspring. As a result the gene pool in animal populations eventually shifted to the point that it is now made up entirely of genes that would tend to work toward self-preservation.
It all goes back to natural selection acting on a diverse gene pool. Any genetic traits that offer survival and reproductive advantages get selected for and soon become the norm for the population. Genes that worked toward attitudes of self-preservation offered a survival advantage and got selected for and became the norm for virtually all animals. Humans just have a more sophisticated cognitive expression of these traits owing to our more developed brains.