Over and over again, the Bible warns about covenant breaking. Not everyone who heard Moses' words in Deuteronomy 7 believed and lived as God's people. And that's true in the New Testament, as well. Jesus warns His disciples in John 15 that they must remain in Him with a living, working, fruit-bearing faith because if they don't bear fruit they'll be cut off from Him. We need to take that warning to heart and impress it on our children.
Covenant life is never simply automatic.
But that doesn't mean God didn't make a promise in the first place. He was saying that His promise is really for you. When you stray, you can turn back and plead His promise of forgiveness. When you're weak, you can cry out to Him to give you the Spirit as He promised so that you'll stand. He said so.