Because God loves us, he gives us practical teaching and boundaries to protect our hearts. The whole thing is one big expression of a father's love for his children.