God chose the Israelites unilaterally and continued to pour out His grace on them. Since God made a covenant with them, there were, of course, rules of observance; if they kept the covenant, they would receive blessings; if they did not, they would be punished. However, no matter how much the people resorted to idolatry, the covenant was not broken. This is similar to the love of a parent who punishes his or her child because of love, but does not give up on the child.