What an interesting thought: Thanksgiving keeps you from sin. Is that true?
Look closely at Romans 1:21:
"For although they knew God, they did not honor him as God or give thanks to him, but they became futlie in their thinking, and their foolish hearts were darkened.
I'm sure you're wise enough to know the Greek manuscript didn't have "give thanks to him" in bold and italics. The emphasis is mine. But, the emphasis is an important one.
Romans 1 is clear that everyone knows God. He has revealed Himself to us through Creation. Understanding God as Creator prepares our hearts to accept the authority God wants in our lives when we repent of our sins and surrender to Christ. Simply put: seeing an amazing God in creation prepares our hearts for the amazing love of Jesus.
But Romans 1 also gives some insight into the brutal reality of NOT worshiping God. We find out some reject Him. And in verse 21 we see that part of rejecting him is described in those who did not . . give thanks to him.
When we fail to give thanks to God, it begins a slippery slope of giving credit to ourselves. What Paul describes then are some who exchange worship of God for worshiping the creation itself instead.
Space doesn't permit full descriptions of humans worshiping creation. Let's just leave it at this: we know it happens. You can read the rest of Romans 1 for Paul's descriptions.
If we give thanks, we keep God in the center. Those who failed to give thanks were led down the path of worshiping the creation instead of the Creator.
It's true: Thanksgiving can keep you from sin. Give praise to God in this special season and always!