"Therefore, they must needs be chastened and tried, even as Abraham, who was commanded to offer up his only son."
Doctrine and Covenants 101:4
The story of Abraham is hard sometimes for me to understand. If you haven't read it, here is a brief synopsis: Abraham left the land of his fathers because he didn't believe in human sacrifice, and because they had tried to sacrifice Him. So, he is saved by God, and given incredible promises, and has a son given to him miraculously by God. Abraham loved him incredibly, and then God asks him to sacrifice the son. Abraham believed in God and trusted him so much, that everything that he escaped from and everything he loved, he was willing to sacrifice for God. In the end, God sent a ram to sacrifice instead, and Abraham received the reward of his faith.
So why did God ask him to sacrifice his son? I think that he did it because it was the thing that Abraham valued the most in his life... his son was everything to him. His hope for the future, the physical representation of everything that God had promised... and God tested Abraham to see if Abraham would put God first. It was also a representation of what God did for us... in sacrificing his only son for us. Are we willing to do the same for him?
God might not do it quite as dramatically or literally in our lives, but we all will be tried to see if we are willing to sacrifice what we love most in life for God. Sometimes he will send a Ram, and sometimes he won't. But even when he doesn't... everything that God does is designed for our ultimate good and happiness... we just have to trust him a heck of a lot sometimes.