>>83000984 (OP)
Species that kill each other randomly go extinct fairly easy because they don't require external factors to threaten them - they do it by themselves.
Species of loners get outcompeted by social species because they easily outnumber them. But social settings require rules as everything in nature is about energy. Food is basically energy in, work and effort is basically energy out. If your energy intake is lower than your energy outflow, you'll sooner or later die. That's why even the most basic life forms stop cooperating whenever they get screwed energy-balance wise.
Better cooperation allows for specialization as you basicaly trust others to take care of certain matters while you focus on something else in return. Specialization allows technological progress and thus advantage over social species that do not have enough cooperation to develop specialization.
This of course doesn't negate natural competition, so in reality social species are constant struggle between opportunism and trying to screw others over so your energy balance would be better so you could leave more copies of your genes or whatever, and enforcement of rules allowing cooperation to continue and outcompete other groups. Also mistakes cause conflict even when both sides are well-meaning.
Those rules are basically morals and it's nothing more than beneficial behavior patterns in social species. Religion is nothing more than attempt at codification of those patterns mixed with rituals to strengthen social bonds, hierarchy to create order in past times of chaos, and some natural human greed and corruption, because no human construct is safe from human flaws which come from nature itself and can't be completely avoided as we're part of nature.
This means no specific religion is required for morals, but you will naturally develop religion or something similar in a process of maintaining behavior beneficial for survival.