When the Lord brought the children of Israel to the Promised Land, Moses reminded them of their commitments to Him before they crossed over to inhabit the land. The Israelites had agreed to keep the Lord’s commandments and reaffirmed that promise.
Deuteronomy 5:27 Go thou near, and hear all that the LORD our God shall say: and speak thou unto us all that the LORD our God shall speak unto thee; and we will hear it, and do it.
The Lord, Who knew their hearts, expressed His desire that they would indeed have a heart for Him to do all that they had committed.
Deuteronomy 5:29 O that there were such an heart in them, that they would fear me, and keep all my commandments always, that it might be well with them, and with their children for ever!
God knew that His way was best. His desire was that the Israelites experience the best He had to offer (“that it might be well with them”). The blessings they could experience would pass on to their posterity as well (“and with their children for ever”). However, He knew that their heart was not in the right place. As history shows, they would disobey Him and receive just recompense for their sin.
The same is true with us. God created life and He knows how life is best lived. Why do we not trust Him in this? God loves us as a parent loves his child. He wants the best for us, but like wayward children, we all to often refuse to give up our own selfish desires. We need to have a heart for God and obey Him. Then we can expect His blessing upon our lives.