That doesn't mean you should kill everyone. In fact, logical thought says that if you kill someone, then others will follow, and people will try to kill you. Thus, assuming a person or creature is interested in its own self preservation, it will not kill.
Similarly, cooperation and sharing arise even when everyone is completely selfish. Its like egoism that holds that every action is selfishly motivated. Even donating to charity is done for a persons own benefit, the joy they feel at helping someone else.
for example, 2 guys are on a plot of land and neither cares at all about the other. Each is only interested in his own gain and has absolutely no sympathy compassion or respect for the other. Now you would say that they would both kill each other out of greed for the land. Actually though, they will share it, for each knows that if he doesnt share it will start a conflict which jeopardizes his safety.
All morals can be deduced through logic, egoism, and instinct. No sky fairy needed.