I think the Biblical teachings are an attempt by patriarchal men, through the use of their self-projection as God (SPAG), to have control over the majority with their own flavor of subjective morality. They are also a way of dealing with the human fear of death, the need to be loved, the need to feel important, the need to have a purpose, etc.