If you are giving thanks, then you are in the will of God, “In everything give thanks; for this is the will of God in Christ Jesus for you.” 1 These 5:18
If we want to be in God’s presence, give thanks, “Enter into His gates with thanksgiving, And into His courts with praise. Be thankful to Him, and bless His name.” Psalm 100:4
Since everything that God does is good (Psalm 145:17), then we need to be thankful in all things, “And whatever you do, whether in word or deed, do it all in the name of the Lord Jesus, giving thanks to God the Father through him. Col 3:17
Lastly, thanksgiving builds Christian character, “All this is for your benefit, so that the grace that is reaching more and more people may cause thanksgiving to overflow to the glory of God.” 2 Corinthians 4:15