The rules that exist in religion are basic human nature laws, in my opinion. We as a species have relied on teamwork and cooperation, so killing your neighbor would be counterproductive. As to why so many cultures came up with supreme beings, it was to explain natural phenomenon that they didn't have a scientific explanation for. We are still searching for most of these answers.