When reading the Bible you at times find a word or phrase repeated a number of times. I call this an “insight word” or “insight phrase.” It was put there for emphasis.
In Psalm 107, for example, you have this statement repeated 4 times: “Let them give thanks to the Lord for his unfailing love and his wonderful deeds for men.” The Psalm is introduced with the words, “Give thanks to the Lord, for he is good; his love endures forever. Let the redeemed of the Lord say this.”
Each of these repeated statements is preceded by an explanation of the condition in which some people found themselves, either by their own choices or by circumstance. In each case they got to a place where the pain or difficulty got so bad they cried out to God. In each case when they cried out, God in mercy responded and helped them. That is why they were encouraged to give thanks to the Lord for his unfailing love and his wonderful deeds for men.
The Psalmist concludes this Psalm by pointing out that God works in ways that at times don’t seem to make sense. According to verses 42 and 43, “The upright see and rejoice, but all the wicked shut their mouths. Whoever is wise, let him heed these things and consider the great love of the Lord.”
For one whose hope is in the Lord there is a realization that God is indeed working all things together for good to those who love Him and are called according to His purpose (Romans 8:28). Since this is true, it is another expression of the Lord’s unfailing love and His wonderful deeds for men. This in turn is a reason for giving Him thanks.