Praise be to Allah.
The command to give the meat of the udhiyah in charity is reported in a number of hadiths, as was the permission to eat some and preserve some.
Al-Bukhari and Muslim reported that `Aishah (may Allah be pleased with her) said: “Some poor families among the people of the desert came to al-Madinah on the occasion of `Eid al-Adha at the time of the Messenger of Allah (peace and blessings of Allah be upon him). The Messenger of Allah (peace and blessings of Allah be upon him) said, ‘Keep with you meat sufficient for three days, and whatever is left, give in charity.’ After that, they said, ‘O Messenger of Allah, the people made water-skins with [the hides of] their sacrificial animals , and they rendered the fat from them. The Messenger of Allah (peace and blessings of Allah be upon him) said, ‘What about it?’ They said, ‘You forbade us to eat the meat of our sacrificial animals after three days.’ He said, ‘I forbade you to do that because of the people who came, but now eat some and preserve some and give some in charity.’” (Reported by Muslim, 3643)
Al-Nawawi said, commenting on this hadith:
“The phrase ‘I forbade you to do that because of the people who came’ refers to the poor Bedouin who came to Madinah, and this was so that they could be helped. ‘Rendered’ means that they melted down the fat from the animals (to be stored and used).
The phrase ‘I forbade you to do that because of the people who came, but now eat some and preserve some and give some in charity’ is a clear statement that this prohibition of keeping more than three days’ worth of meat no longer applies; it is also a commandment to eat some and to give some in charity. With regard to the portion to be given in charity, if it is a voluntary sacrifice, then giving some of it in charity is obligatory, according to the view regarded by our companions as correct. It is preferable [mustahabb] for most of it to be given in charity. They said: at the very least, a third should be eaten, a third should be given as gifts and a third should be given in charity. There is another opinion that suggests half may be eaten and half given to charity. This difference of opinion has to do with the amount that is mustahabb. With regard to the other parts of the animal, it is OK to give them in charity. As for eating from it, it is mustahabb but is not wajib (obligatory)… The majority of scholars interpreted this command (i.e., the ayah (interpretation of the meaning): ‘… eat thereof…’ [al-Hajj 22:28 and 36]) as implying encouragement or permission, especially since it came after it had been prohibited.”
The Shafi`is said that it is mustahabb to give most of it in charity, and said: “At least one third of it may be eaten , and one third given in charity, and one third given away as gifts.” They said that one half may be eaten, but it is more correct to give some of it away in charity .” (Nayl al-Awtar, 5/145; al-Siraj al-Wahhaj, 563).
“We go along with the hadith of ‘Abd-Allah (ibn ‘Abbas – may Allah be pleased with them both): ‘He should eat one third himself, feed one third to whomever he wants, and give one third in charity.” (Reported by Abu Musa al-Isfahani in al-Wazaif; he said it is a hasan hadith. This is also the opinion of Ibn Mas’ud and Ibn ‘Umar. No conflicting opinion is known among the Companions.” (Al-Mughni, 8/632)
The reason why there is a difference of opinion as to how much of the sacrifice may be given in charity is that there are conflicting reports, and some reports were narrated without specifying a particular amount, such as the report of Buraydah (may Allah be pleased with him) who said: “The Messenger of Allah (peace and blessings of Allah be upon him) said: ‘I had forbidden you to eat from the sacrificial meat for more than three days so that those who could afford it could give to those who are poor, but now you can eat as you wish, feed others from it, and preserve some.’” (Reported by al-Tirmidhi, 1430; he said it is a sahih hasan hadith). The scholars among the Companions of the Prophet and others followed this.
And Allah knows best.