Abraham was tested by God (Genesis 22:1) to know whether he would abandon his attachment towards his son.
Attachment is a sign of ego, the fountain head of all vices. When you ignore all the factors and forces (known and unknown) that are at work behind every happening, you tend to say “I did this and that”thus taking credit for which your part is too negligible. It is like a farmer taking credit for the agricultural products. That means ego arises in ignorance. In ego, you place “the I”in the middle of your garden, your life. Ego tends to think in terms of “good”and “bad”and you want to accumulate what you think as good and hate what you think to be bad. Thus in ego, you have many desires. If desire is not fulfilled, anger (vice) arises. If desire is fulfilled, you develop attachment (vice) toward what is gained and crave for more of it, greed (vice) both of which further reinforce your ego. This causes a vicious circle.
Thus attachment is clearly a product of ego. Abraham’s attachment to his son was put to test. He was asked to sacrifice what is closest to his heart and dearest to him. Abraham showed his love of God is more important than his love toward his son. Thus behind the details, story has a good message—Love the Gift-giver more than the gifts.
However, this story makes sense only in connection with those who have ego problem. In all cultures sacrifice of ego (the brute within) was symbolized by sacrifice of some animal. Many call God as ‘greater Abraham’and say Abraham’s test foreshadowed what God would do in the future sending his son to die for the sins of the world. When the Bible writers say ‘God so loved the world that He was even willing to forego His attachment with His only begotten son and sent him to die for us’they indirectly mean God has attachment, which is one of the manifestation of having ego, the source of all evils.