Muslims celebrate two religious festivals every year - Eid-ul-Fitr and Eid-ul-Azha. Eid-ul-Fitr is a festival that precedes the holy month of Ramadan while Eid-ul-Azha is celebrated on 10th of last Islamic month of Zul Hijjah, offering an animal, be it cow, buffalo, lamb, sheep, or goat.
The philosopy of Eid-ul-Azha is to be ready to sacrifice ourselves for the Will and Pleasure of God, Almighty. As God says in Qur'aan that neither the blood or meat reaches to him but our intention. It is also an event where those poor people who can not afford meat enjoy meat and anyone who sacrifices the animal, gives to poor people. If one keeps whole meat, the sacrifice is of no use and it will not be accepted.
Eid-ul-Azha is celebrated in the memory of one of the beloved prophets of God, Abraham. Abraham (peace be on him) saw a dream that he is sacrificing his most beloved son, Ismael (peace be on him). Second night and then third night he saw the same dream. Since the Prophet's dream is reality, he took Ismael out so that he can sacrifice him for the love of God. This was the test by God, Almighty Allah. And good people are always tested as God says in Qur'an that HE will test people with the loss of wealth, life, etc. and see who has the patience and will to subdue to HIS will.
Abraham (peace be on him) told the dream to his beloved son Ismael (peace be on him) that he is sacrificing him so what was his will. The son told him to fulfil the dream as it was from the LORD, Allah. So they went out and as soon as Abraham (peace be on him) started to sacrifice, the knife did not work at all and God, the Mighty replaced the son with a sheep sent from the Heaven and the knife cut the throat in instant. This was, as I said, a test to see how much they loved God, although prophets are always innocent from any kind of sins but it is mainly to teach the rest of us to act the way they did and give away our favourite thing in charity to please God, the Almighty Allah.
We also learn from this festival that we should give charity whole year and never forget those people who have less than us in commodity and necessity of life. We must please our fellow humen if we want to please our God, the Almighty. Because God may forgive whatever is between us and God, but God does not forgive those who do bad to others in the world. Similarly, HE rewards in abundance to those who take care of fellow humen as well as show mercy to HIS all creation, including animals, birds, insects, etc. May we achieve the piety and love of God through good deeds, ameen!