Sacrifice is a consequence of sin.
Before sin entered the earthly creation, Adam and Eve enjoyed a perfect, harmonious relationship with GOD. Everything was good.
When sin entered the picture, however, things changed. GOD needed to teach humans to respect and appreciate the ugliness and cost of their sin.
Early into the Bible, we are introduced to the concept of an offering or sacrifice made to GOD.
2 ... Now Abel was a shepherd of sheep, but Cain was a tiller of the ground. 3 Now in the process of time Cain brought a sacrifice to the Lord from the fruits of the ground. 4 Abel also brought a sacrifice from the firstborn of his flock and of their fat. The Lord respected Abel and his offering, 5 but He did not respect Cain and his sacrifices. So Cain was extremely sorrowful, and his countenance fell. 6 So the Lord said to Cain, “Why are you extremely sorrowful? And why has your countenance fallen? 7 Did you not sin, even though you brought it rightly, but did not divide it rightly? Be still; his recourse shall be to you; and you shall rule over him.”
(Genesis 4:2b-7 OSB)
We aren't given the reason why Cain and Abel brought this offering, but it is telling that they both brought an offering at the same time, indicating it may have been something GOD required.
Furthermore, GOD's comment to Cain about Cain's failure to rightly divide his offering indicates that GOD had given instructions about how to present this offering to Him so that it would be acceptable.
The sacrifice of animals is a practice that dates back to Genesis 4. Note that Abel offered the fat of his flock. That indicates Abel killed and carved the lamb that he offered to GOD.
Later, GOD gave Israel detailed instructions on how to properly sacrifice animals in the Law of Moses. Many of these animal sacrifices were sin offerings—sacrifices given with the intent of receiving GOD's forgiveness for sins committed by the one sacrificing. We previously established that life is in the blood and that the payment for sin is life.
Sin is what makes sacrifice necessary. Sacrifice is the act of giving up something of value in exchange for some form of blessing or approval.
Prior to Jesus, animals and other offerings, such as food, were sacrificed for specific purposes. Jesus fulfilled the Law of Moses and authored a new covenant, eliminating the need for such ongoing sacrifices to GOD. Jesus' body and blood provided the ultimate sacrifice to GOD, appeasing His wrath with humanity and providing a just settling of the debt caused by sin.
The good news is that GOD freely offers anyone and everyone access to this sacrificial payment. But the one who accepts must choose to die to themselves and become a disciple of Jesus. Doing so is so very worth it!
The apostle Paul wrote:
6 You see, at just the right time, when we were still powerless, Christ died for the ungodly. 7 Very rarely will anyone die for a righteous person, though for a good person someone might possibly dare to die. 8 But God demonstrates his own love for us in this: While we were still sinners, Christ died for us.
9 Since we have now been justified by his blood, how much more shall we be saved from God’s wrath through him! 10 For if, while we were God’s enemies, we were reconciled to him through the death of his Son, how much more, having been reconciled, shall we be saved through his life! 11 Not only is this so, but we also boast in God through our Lord Jesus Christ, through whom we have now received reconciliation.
12 Therefore, just as sin entered the world through one man, and death through sin, and in this way death came to all people, because all sinned—
13 To be sure, sin was in the world before the law was given, but sin is not charged against anyone’s account where there is no law. 14 Nevertheless, death reigned from the time of Adam to the time of Moses, even over those who did not sin by breaking a command, as did Adam, who is a pattern of the one to come.
15 But the gift is not like the trespass. For if the many died by the trespass of the one man, how much more did God’s grace and the gift that came by the grace of the one man, Jesus Christ, overflow to the many! 16 Nor can the gift of God be compared with the result of one man’s sin: The judgment followed one sin and brought condemnation, but the gift followed many trespasses and brought justification. 17 For if, by the trespass of the one man, death reigned through that one man, how much more will those who receive God’s abundant provision of grace and of the gift of righteousness reign in life through the one man, Jesus Christ!
(Romans 5:6-17 NIV)