Moses gives speeches about laws and the importance of following God before the Israelites enter the Promised Land.
Understand therefore, that the LORD thy God giveth thee not this good land to possess it for thy righteousness; for thou art a stiffnecked people.
So, understand that God is giving you this good land, but not because you are righteous. You are a stubborn people.