In "God's Word for Today" Gordon Snider writes:
They must have a different inner motivation than their fathers had. They must have a heart to obey their God (6:1-3). They must never allow the knowledge of what pleases God to be forgotten (6:4-9). They must look for practical ways to ensure that their covenant with God was not violated (6:10-25). One of those practical ways of keeping the romance in their relationship with God was intentionally to pass their love for God on to their children (6:20-25). For no matter how much they determined to keep God in their hearts, if they did not communicate that same value to their children, their children would lose the benefits of the covenant. To be sure, that process begins in 6:7, but it is the total focus of 6:20-25. The strength and security of the country depended, as it still does, on the integrity of the home. Every parent/teacher knows the value of “teaching moments.” Moses urged parents to seize the moments to instill a love of the covenant in their children. A country is only as strong as the homes that form its foundation.
Source: Building Christian Relationships: Adult Teacher's Insights, page 59.