Morality, as Leonardo mentioned, probably has its roots in pack preservation.
But while the question may be relevant to some religions, the question is irrelevant to someone's lack of belief in God.
Morality and theism at their core are two different things. Christians, for example, are a bunch drawing an abstract connection between the two.