Longer lived animals are big, like elephants, or predators, like lions. Prey animals age faster. Evolution doesn't try to get a mouse to live longer, because by 2 years old, most are dead anyway. Humans are among the longest-lived mammals.
Long life is useful for animals where learning is a key component of fitness - live longer and the animal can learn more while death wipes away all that accumulated knowledge. (Generally) predators have higher gains from learning. Omnivorous humans have even greater gains.