Worry and anxiety are enemies of progress. They are an expression of doubt in God’s ability to deliver you out of a situation. Paul encouraged the church to take their specific requests to God in the place of prayer and to top it off with Thanksgiving. Before that he told them to cast aside worry and anxiety. He did not say give thanks for all things but rather give thanks in all things. God is only the author of good; He is not the author of evil.
It takes a man or woman who has absolute faith in God to give praise and thanksgiving in the midst of the most challenging circumstances. Paul and Silas knew that God would deliver them. Acts 16:25. Jehoshaphat knew that God would win the victory for him and his people. 2 ch 20:21. Before feeding the 5000 men plus women and children, Jesus gave thanks knowing that the Father will provide.
In all these instances any anxiety was cast aside. Rather thanksgiving was offered unto the God with outstanding results following. You and I can have similarly great results but we must stand in the face of trials and offer thanksgiving to God in the midst of the situations.