If religious ideas are taken away, what constitutes a 'good life'? A lot of people seem to think that without the threat of postmortem punishment, we would all be utterly selfish, hedonistic beings. I'm sure there are psychopaths for which this is true, but in the end religion often doesn't keep them in line anyway. For the majority of humanity, religion is just a way to externalize our internal empathetic feelings. We automatically feel for those suffering, and feel good when we are able to help. The issue is that from a non-religious perspective, how much should we help others? Should we only help them when doing so will make us feel better? Is there really a reason to do anything that doesn't maximize our overall happiness?
That last part may be the key. There are many things that I do that don't make me immediately happy. Often I would rather go for a jog than go to work, or watch TV rather than go for a jog. I don't go to work because I believe God wants me to, I do it because I know in the end it will make me happier than the instant gratification of sitting around watching Star Trek reruns.
When someone thinks about living a 'good life', they think of being old and looking back at their lives as a whole. Most people want to be able to say they made the world a better place, achieved some success, but didn't cheat others. I don't know if this is actually how we judge our lives, or if it is even how we should judge our lives(1). If we accept this, though, it makes sense that we would help others even when it doesn't make us happy now, or even in the near future, in order to maximize our overall happiness.
(1) I'm not sure this is the best criteria for maximizing happiness because it may only be what makes us happy towards the end of our lives. Perhaps a blend of increasing current happiness without completely sinking our future prospects for joy is more appropriate. In any case, what we now think will make us happy when we are old may not be correct at all.