It is based by Christianity on the idea of replacing the animal sacrifices done by the Jews in the Temple, with a human being as the sacrifice instead.
Christianity teaches that blood was necessary for the remission of sin. This is not true. There were many other sacrifices brought, such as grains. Animal blood sacrifices were only used for unintentional sin.
To replace animal sacrifice with human sacrifice was never a concept that existed in Judaism, nor does it exist in the Jewish Torah (the old testament).
This idea in Christianity comes straight from the ancient pagan cults that selected virgin men (and women), declared them to be human-gods, and then sacrificed them. Then the body was eaten and the blood drank in rememberance of the god/human who had been sacrificed and also because it was believed that by eating the body and drinking the blood, the human/god's powers would be taken into the person eating it.
Christianity also justified this by creating the doctrine of Original Sin, which doesn't exist in Judaism. The Christian leaders deliberately misinterpreted the story in Genesis of Adam and Eve to give it the result of Original Sin, which is a doctrine that states all people are born sinful, worthless, filthy like rags and cannot do anything about this state themselves but must come to the Church and the Church's dead but risen man-god in order to have "salvation" from this state.
And of course it required its followers to eat the body and drink the blood in rememberance. This was taught to be literal, that the wafer turned into the body, and the wine turned into the actual blood, upon eating and drinking it. Later, this was toned down to be "symbolic" for most branches of Christianity.
The theme of a god impregnating a virgin human, the resulting child is born in a humble abode of some sort (cave, stable, etc.) , the child is a human-god astounds the elders in the house of worship at a young age, grows up and then disappears for a period of time, reappears to teach and gather disciples, then is betrayed by a close follower for something of monetary value, taken to be sacrificed, ascends to the underworld for 3 days, then rises again to renew all life, then ascends to the upper world where he sits at the right hand of the main god...
all of this is extremely common and found among dozens of ancient mythologies of gods long before Jesus. I mean, it's WORD FOR WORD the same.