Langdon Gilkey was a theologian and philosopher who, as a young man with a degree from Harvard, went to China to teach English and philosophy. While he was there WWII broke out and the Japanese invaded China. Gilkey was detained and held in a facility with 2000 others under very trying conditions.
He writes about his experience in his 1966 memoir titled Shantung Compound. In the book he describes himself at the time as holding the belief that human reason would enable him and his fellow prisoners to transcend their conditions and build a community based on their common humanity and solidarity. He also believed that religion was a "frill" that wasn't necessary for people to seek to advance the common good, a goal that "any unbelieving naturalist (atheist) can easily avow."
For a while his optimistic humanism was affirmed, but as time wore on he began to experience disillusionment. His worldview, his view of his fellow man, suffered a series of blows, but one in particular was especially jarring.
Gilkey was chosen by his fellows to head up the committee in charge of housing. Conditions were extremely cramped and the closeness led to a lot of friction. One particular housing unit had eleven inmates in a room that could comfortably accommodate only half that number, and Gilkey learned that an adjacent unit of exactly the same size had only nine inmates. The unit with nine was crowded but not as badly as the unit with eleven.
Gilkey thought that there was an obvious and rational solution: Send one of the inmates from the more crowded unit to the less crowded unit and both would have ten inmates and be on equal terms. This was a just and moral solution, he thought, that any reasonable person would accept.
But he was disappointed to find that the less crowded unit refused to accept a tenth inmate. They told Gilkey in so many words that it was not in their self-interest to make their quarters more crowded than they already were. Gilkey argued passionately that they were being irrational and unfair, but his appeals fell on deaf ears. They even threatened Gilkey with physical violence if he persisted.
He concluded from this that if rationality conflicts with self-interest men will often choose self-interest. Rationality and logic were insufficient to move men to promote the greatest good for the greatest number.
In other words, although Gilkey doesn't put it in these terms, he was confronted with a conflict between utilitarianism and egoism, and he found to his dismay that egoism frequently prevailed, even among otherwise rational men.
I disagree, though, with his conclusion that these men were being irrational. I think they were acting perfectly rationally. Gilkey simply assumed that utilitarianism is the rational ethical stance, that we should always seek to promote the greatest good for all, but why should we?
Why should anyone care about the well-being of others? Why is it not rational to promote the greatest good for oneself? This is indeed the default position in a secular society. In the absence of any transcendent source of moral imperatives the rational course is to look out for #1, to put one's own interests ahead of the interests of others.
This could only be wrong if there actually is a transcendent moral authority with the power to hold us accountable for our choices and who demands that we care about others at least as much as we care about ourselves. If no such authority exists then egoism makes perfect sense.
People who are repelled by this conclusion and who are convinced that we have a moral obligation to do what is fair for all are tacitly making a case, whether they realize it or not, for the existence of God because such an obligation can only exist if God imposes it upon us.
This is not to say that those who do not believe that God exists will necessarily be egoists. People can certainly choose arbitrarily to live any way they wish. What it means, though, is that there's nothing in atheism that requires one to care about the welfare of others. On atheism egoism is perfectly rational, and any other ethical outlook is purely a matter of subjective preference.
Atheists who think this repugnant should probably rethink their atheism.