I have heard that philosophy recognizes or recognized a human inner drive to offer sacrifices to a higher being/authority and that this is the basis of early pagan practices and the foundation of religion.

Is this concept discussed anywhere?