> If there is no afterlife, then eventually there will be nobody left in the world,
Whether or not there is an afterlife, it is inevitable that the earth will become uninhabitable. It seems far more likely that humans will die off before that becomes a problem.
> in which case nothing that anyone had ever done or said would have really mattered
Like the old joke about fish not being aware of water, I think people who have spent their entire lives in a Christian mindset forget that the novel thing Jesus was offering was an afterlife. Many cultures and religions believe a person simply stops existing when they die (including Judaism), yet the people without a belief in the afterlife still seem to care if they are happy or miserable.
Let me try another tack along the lines of the thought experiment I stated elsewhere in the thread. Christians believe in a personal soul that outlives the body it is tied to. I'm sure some Christians might think that some animals have souls as well, but I'll go out on a limb and say most don't believe, say, a beetle, has a soul. If you came across me torturing beetles with salt, or fire, or pulling their legs off, you'd rightfully think I'm a horrible person. Why would it matter? After all, the beetle has no soul and will be dead in a few months anyway. It is because even though the pain is temporary, it is very real while the beetle lives through it.