Today I watched a video call The God's aren't angry. It explains that cavemen were dependent on plants growing and hunting animals to survive, and beyond that they were dependent on the rain and sun and birth for survival, things they couldn't control. So the early religions were an attempt to appease the gods, the forces in the heavens on which their survival depended. The way they attempted to appease them was through sacrifice. They would sacrifice part of their harvest, animals, they would cut themselves, castrate themselves and even perform human sacrifices. The strange thing is these acts weren't isolated incidents, this was a broad trend across human history and geographical areas. Examples are given from the Incas to Asia Minor.
Part of the story of Abraham, the root of all Western religions, is that God commanded Abraham to sacrifice his kid and then called it off at the last moment. He sacrificed a ram that God provided instead. When you read the story today you think "how barbaric that God would even ask him to kill his son"... but consider the time. This was a change from the Angry Gods that demanded sacrifices to a God that would provide. This was a God that spoke to man. It was also a single god, rather than a god of the moon, and a god of the sun, etc. It was a dramatic shift in the evolution of religion.
It seems most religions gave up even on animal sacrifice. The jews quit animal sacrifice in 70 AD when the Romans destroyed the temple. Christians believe that Christ died for everyone's sin and there is no longer the need to sacrifice animals. So for those who think religions are barbaric at least we've moved past human sacrifice and self castration.