God's anger burned against Israel because they broke their covenant of faith with him. He allowed their defeat at Ai to remind them how seriously he hates sin. Fortunately for us, our covenant is based on the works of Jesus Christ, not our own, so we can overcome sin and live the new life God has for us.