The Victory - 48:25 They are the disbelievers, those who prevent you from the Holy Mosque and from reaching the place of sacrifice. Were it not that there are believing men and believing women whom you would hurt because you do not know them, so that you might unknowingly grieve yourselves because of them... So Allah will admit into His mercy whoever wills. Had they not been mixed with each other, We would have punished those of them who disbelieved with a painful torment.
The purpose of sacrifice:
The Pilgrimage/22:36 There are benefits for you in the sacrifice of animals as a sign of worshipping Allah. You should mention the name of Allah over them while they are lined up. And when they fall on their sides, eat of them, and feed the beggar and the poor, We have made them available for you so that you may give thanks.
The Pilgrimage/22:37 Neither their flesh nor their blood reaches Allah; only your righteous deeds reach Him. He has made them at your service so that you may remember the greatness of Allah for guiding you to the truth.