The heat was on and they were trying to squirm out. God was irrelevant to them. He was a genie who will help them out of their fix. This is the response of faith to a faithful God. Thanksgiving is more than thankfulness for material things.
Unbelievers give thanks for material blessing.
Christians should thank God for the grace of God, the provisions God has made in Christ. We should thank him for our positional truth, for the wonder of his attributes. The extent of some people's capacity for thanks is to thank God that the pressure is removed. Once the pressure goes they move on and forget that God exists. We are to present our requests to God as if he did not know all about it.