It seems that nowadays, with all the emphasis on environmentalism, it can be confusing why in the Bible God demanded that the Jews kill animals as a sacrifice to Him. I'm sure if the Jews do rebuild their temple and restart their sacrifices, that PETA will be all over them protesting animal cruelty. However, when you look at the reason behind why God asked for animal sacrifice, you'll see it's not just an excuse to kill animals, and doesn't go against the 10 commandments.
History of Biblical Sacrifices
In the Bible, the first sacrifices started as soon as Adam and Eve were kicked out of Eden. Eve's first two sons Cain and Abel grew up and Cain became a farmer and Abel raised sheep. They gave an offering to God - Cain gave some of the crops he grew, and Abel gave a first-born lamb to God. Abel's sacrifice pleased God more than Cain's, and that's what caused the first murder when Cain became jealous and killed Abel.
All throughout the Old Testament there are references to animal sacrifices. My guess is that the early people used the example of Cain and Abel and determined that God appreciated animal sacrifices more than other types of sacrifice. The next time sacrifice is mentioned is after Noah's flood, where when he leaves the ark he makes an alter and sacrifices some animals to God. It says in Genesis 8:21 "The smell of the burning offering pleased God". There is no direct mention of God ordering animal sacrifice until Genesis 15:9, where God tells Abram (who will become Abraham) to bring Him specific animals, kill them, and then cut the animals in half and lay them on a rock. Then at night Abraham makes a covenant (a binding promise) with God and sees a vision of a smoking cooking pot pass between the two halves of the animals that were laid out. Later in Genesis 22 when Abraham has his first and only son, God tells him to sacrifice his son to God. Abraham is willing to do this, but at the very last minute God provides a ram instead. (Note that this was a test of Abraham's faith, not because God wanted him to kill his son). Another sacrifice is done in Genesis 31:54, but is a willing offering from Jacob and wasn't commanded by God, and again later when Jacob's family moves to Egypt in Genesis 46:1.
So we can see that up to this point, sacrifices were either voluntary as a way of pleasing or thanking God, or a way of sealing a promise. It's not until the Jewish Passover ritual is created in Exodus 12 that God specifies what type of animal to sacrifice and how to do it. Here the Israelites (a term for the ancient Jewish people) were living in Egypt as slaves. The last plague of Egypt after the plagues of frogs, flies, dead animals, sores, hailstones, and darkness would be that God would kill every first born animal and son in Egypt. However, He told the Israelites to sacrifice a sheep or goat, to kill it and put some of its blood on the door frame of their house, and then to cook and eat the animal. God promised that He wouldn't kill the first-born sons of Israel if they lived in the houses with the blood on the door frame. That night, God killed the first born son of every family in Egypt (including the Pharaoh's son) unless they were in one of these houses. This is what finally convinced the Pharaoh to let the Israelites leave Egypt.
This festival of Passover was to be repeated every year for the Israelites to remember that God had freed them from Egypt's slavery. Later when the Israelites are in the desert, Moses is given the first set of laws from God (including the 10 Commandments) which details types of sacrifices to be made, and general rules for their society. There are further instructions for daily animal sacrifice in Exodus 29, as well as sacrifices to ordain priests. The book of Leviticus goes into further details about types of sacrifices. Some sacrifices were to ask for blessings, to thank God for providing, to please God, or to pay for people's sins (when they broke one of the Commandments that were given to Moses, or the various other Jewish laws that were specified at that time). From this point on, the Jewish people sacrificed animals as part of their regular religious duties. These sacrifices were still going on all the way up to when Jesus was alive, and continued afterwards until 70 AD when the Romans destroyed the Jewish temple, and it hasn't been rebuilt since then.
But Isn't Killing Forbidden in the Bible?
One of the most famous commandments is "Do not murder" (Exodus 20:13). Note that it doesn't say "kill", it says "murder". According to the US legal code, murder is defined as "the unlawful killing of a human being with malice aforethought" . This shows that God disallows people killing people, but doesn't say anything is wrong with killing animals. There are other occasions in the Old Testament where God commands people to kill animals, or kills animals Himself (see Exodus 19:12-13, 20:24, 9:2, 7:21, Genesis 9:5-7). Also note that in Genesis 9:5-7 he gives Noah permission to kill and eat animals for food. When God sent Noah's flood, all the animals that were not on Noah's boat also died. These examples show that God has no problem with killing animals or people killing animals.
I'm sure that God probably doesn't approve of people who excessively kill animals (i.e. the huge whale hunts, Japanese dolphin hunts, large scale fishing, etc.) where a large number are killed and not used. I also believe that God would not want the animals to have unnecessary suffering before they are killed. We certainly shouldn't torture animals for fun, because God originally told Adam and Eve to care for creation, and he never took away or cancelled out that command. So I believe that we must balance our rights to rule over animals (Genesis 1:28) and ability to use them as food with the command to care for nature. So I believe this means trying to care for animals, keeping them healthy or caring if they get sick, not hunting to extinction, not purposely causing pain, and if you're killing them to kill them quickly with as little suffering possible.
Why Did They Need Sacrifices?
Some people ask why God would want us to kill animals in the first place, and why He was pleased with animal sacrifices. This is a little more of a complicated argument. It starts when Adam and Eve sinned in the Garden of Eden. God says that the punishment for sin is death (Genesis 2:17). The first sin was Adam and Eve eating from the only tree in the garden that God told them not to eat from. This was the only restriction that God had created, and most scholars believe it was so Adam and Eve could show obedience to God by following his one rule. However, they disobeyed and so God told them they will now die. This implies physical death, and also spiritual death, which is a separation from God. In the garden of Eden, Adam and Eve had a perfect relationship with God - He walked in the garden with them and talked to them personally (Genesis 3:8). But because God can't tolerate sin since He is perfect and sinless, He could not keep a close relationship with them anymore.
In the book of Romans, disciple Paul goes over the argument of sin and death. If you want a more thorough argument, you should read all of Romans. But you can basically summarize Paul's argument as this: Adam sinned and caused death to come into the world. Everyone sins because we are all descended from Adam, and we all are born with the instincts to disobey God (and everyone will sin at least once in their lifetime). So therefore everyone deserves to die. The Law of Moses was created to show people that we are sinners, and to show us that we deserve death. God's rule for sin was that it deserves death. So the Old Testament rules of sacrificing animals to God for sin were to show to the people that sin needs to be paid for with death. There were rules about the types of animals to use, and they typically had to be the best and most pure animals. However, since no animal is completely perfect, the sacrifices for sin could only count for a limited amount of the people's sins, which is why they had to have daily sacrifices. Since Jesus never sinned and was perfect, he was a fully acceptable sacrifice to God, and was able to pay for every single sin that had been done in the past, or would be done in the future, by every single person who has ever lived and will live.
Sacrifices Were Foreshadowing for Jesus' Death
These sacrifices were foreshadowing to when God would pay for everyone's sin through Jesus' death, where Jesus is the ultimate sacrifice for our sins. This is why I believe that Abel's sacrifice was more acceptable (a first born lamb) than Cain's (some crops) because Jesus is called the first-born and only son of God, and is often referred to as "the Lamb of God". So Abel's sacrifice was a better foreshadowing of how everyone's sins would be paid for than Cain's was. Similarly, the lamb that Moses killed for Passover and spread the blood on the door frame is a prophecy about how Jesus (the Lamb of God) would be killed so that we would be forgiven by his blood and would not go to hell. And it's notable that Jesus was killed while Jews were celebrating Passover, which very clearly shows that Passover was foreshadowing of Jesus' death.
Only Jesus Fully Pays for Sins
I believe that the Old Testament sacrifices probably didn't completely pay for the people's sins. But because the sacrifices were alluding to the future time when God would pay finally for all the sins of everyone when Jesus died on the cross, God accepted these sacrifices for their sins as a temporary way of showing their sins will be paid for in the future.
I believe this matches with the ancient Jewish belief in Sheol, which was the resting place of the dead. Scholars believe that Sheol was split into two areas - one was called "paradise" or "the bosom of Abraham" and the other was an equivalent to hell . Before Jesus died, all the "righteous dead" (either Jews who believed in God and followed the sacrifice rules, or others who were acceptable to God before the Law existed (i.e. Noah, Adam, etc.)) would go to the paradise side of Sheol, and the ancient other tribes and pagans who weren't acceptable to God would go to the hell side. Even though the paradise side was good, the people there were not yet in heaven and couldn't be with God, because their sins had not yet been paid for by Jesus. But when Jesus died, it is said that he went to the paradise side of Sheol (he said to the thief on the cross "Today you will be with me in paradise." Luke 23:43) and preached the good news to the dead (1 Peter 4:6). It says that when Jesus ascended to heaven, he brought the "captives with him in his train" (Ephesians 4:8). I have read scholars who say that the paradise side of Sheol is now empty, because after Jesus died all the righteous dead people's sins were paid for fully and they could now go to heaven and be in the presence of God. So now any Christians who die and believe in Jesus also go straight to heaven. Thus the animal sacrifices are no longer necessary.
So all of this seems to indicate that the animal sacrifices were performed as a way of showing the people before Jesus that they sinned, deserved death, and their sins would be paid for by the death of Jesus. And now that Jesus has already paid for all our sins, we just have to have faith that Jesus' death paid for our sins, and when we die we will also go to heaven to be with God.