The Almighty does not "need" our thanksgiving.
It is we who benefit from feeling and expressing it.
Our Jewish liturgy contains a seldom-noticed prayer, hidden within a prayer, which acknowledges this.
The phrase appears at a high point in the service, yet it is said to oneself:
"We thank You for inspiring us to thank You."
This goes well beyond being thankful for our objective gifts.
It is a recognition that even the ability to know that we should be grateful is a gift from God and worthy of thanks.
–Rabbi Adin Steinsaltz
From the essay, "Thankful for Thanksgiving" by Rabbi Adin Steinsaltz