Why is there "sei", that is the question. It might actually be defective. Just as wrong as:
God be thanks.
Because it is not God who is, it is to God belongs our gratitude, or to God is gratitude due.
"sei" is the hortative mood of is.
It is similar to "Your will be done", where "be done" is also in this hortative or expectative mood. "Dein Wille geschehe" is the same form of "geschehen" as "sei" is of "sein".
Thanks be to God
is a liturgical response, and in German that exact response is
Dank sei Gott (dem Herrn).
That's why "Thanks be to God" is not the exact translation of "Gott sei Dank".
I think this one is the best exact translation:
To God be gratitude
realizing that "to" is like indirect object in English, and in German we use dativ. So Gott should be dativ form here, if we change the words a little while maintaining the same form, it becomes:
Dem Teufel sei Verachtung.
With this change of words, the article "der" became required thus revealing the dativ case.