God asked Abraham to sacrifice his son Isaac to test Abraham's faith and obedience. While this seems contrary to God hating child sacrifice, it demonstrated Abraham's devotion to God. The test also showed God that Abraham feared him, though God already knew this. The story of Genesis follows the tension of whether Abraham's descendants would survive and be righteous, which is resolved through God's covenant with Abraham after the test.