15 “So watch yourselves carefully, since you did not see any form on the day the Lord spoke to you at Horeb from the midst of the fire, 16 so that you do not act corruptly and make a graven image for yourselves in the form of any figure, the likeness of male or female, 17 the likeness of any animal that is on the earth, the likeness of any winged bird that flies in the sky, 18 the likeness of anything that creeps on the ground, the likeness of any fish that is in the water below the earth.19 And beware not to lift up your eyes to heaven and see the sun and the moon and the stars, all the host of heaven, and be drawn away and worship them and serve them, those which the Lord your God has allotted to all the peoples under the whole heaven. 20 But the Lord has taken you and brought you out of the iron furnace, from Egypt, to be a people for His own possession, as today.
21 “Now the Lord was angry with me on your account, and swore that I would not cross the Jordan, and that I would not enter the good land which the Lord your God is giving you as an inheritance. 22 For I will die in this land, I shall not cross the Jordan, but you shall cross and take possession of this good land. 23 So watch yourselves, that you do not forget the covenant of the Lord your God which He made with you, and make for yourselves a graven image in the form of anything against which the Lord your God has commanded you. 24 For the Lord your God is a consuming fire, a jealous God.
25 “When you [d]become the father of children and children’s children and have remained long in the land, and act corruptly, and make an [e]idol in the form of anything, and do that which is evil in the sight of the Lord your God so as to provoke Him to anger, 26 I call heaven and earth to witness against you today, that you will surely perish quickly from the land where you are going over the Jordan to possess it. You shall not [f]live long on it, but will be utterly destroyed. 27 The Lord will scatter you among the peoples, and you will be left few in number among the nations where the Lord drives you. 28 There you will serve gods, the work of man’s hands, wood and stone, which neither see nor hear nor eat nor smell. 29 But from there you will seek the Lord your God, and you will find Him if you search for Him with all your heart and all your soul. 30 When you are in distress and all these things have come upon you, in the latter days you will return to the Lord your God and listen to His voice. 31 For the Lord your God is a compassionate God; He will not fail you nor destroy you nor forget the covenant with your fathers which He swore to them.
Moses is practically telling the future here, and no doubt he was inspired by God to say these things, though I’m sure he hoped the people would not be so fickle after his death.
The story of Israel is a huge display of God’s mercy. As they occupy the land of Canaan, and have various leaders, and then kings (both good and bad), they will indeed be fickle. But God will be faithful, and He will be merciful.
Time and again he will warn them to turn their hearts back through prophets, and when he finally allows them to be deported, it almost seems overdue. But God’s timing is not ours, and his faithfulness is not ours (so much greater), and his mercy is not ours (again, so very much greater).
Ultimately, God loves us, almost to a fault, as we would say of a human parent. But God’s love is always working things for our best, and it works a lot better when we are seeking Him first.