God wanted to test Abraham for how much he loves God. To test his willingness to obey God's commands no matter what it would cost him. You see, Isaac, being his heir, the son that God had promised him, that he waited for so long, is Abraham's most valuable treasure. God knows it very well and by commanding Abraham to sacrifice his son, He gave him the ultimate test of faith and obedience.
I suggest you read further. Then you will see a bigger picture of God's purpose for giving Abraham such a difficult command.