German did lose its dental fricatives early on, but not quite early enough to avoid affecting the orthography.
The transition from /θ~ð/ to /t~d/ is usually considered part of the High German Consonant Shift. But this generalization can be misleading. This change did start in the same region as the other High German changes. But /θ/ shifted significantly later, around the 10th century, and spread significantly farther, affecting all of the West Germanic languages except English.
By this point, German had just begun to be written down. "Th" was chosen for /θ/, by analogy with Greek theta (transcribed as "th" in Latin, and now pronounced /θ/). So the cognate to English "think" was written thenken (modern German denken).
But then /θ/ disappeared from the language. With the distinction between /θ/ and /t/ lost, it was no longer clear which German words should be written with "th" and which should have "t". Thus "th" appeared in some words like Thal, which originally had /d/ (compare English "dale"). A similar process in English created the "th" in "Thomas" and "Thames".
Eventually this use of "th" fossilized. Words like Thal were permanently written with "th", while words like denken were permanently written with "d".
In 1901 the orthography reform finally removed this distinction, replacing Thal with Tal and Thier with Tier. "Th" now survives only in proper names (Goethe) and Greek-derived loanwords (Thron).
Source: I've been using Duden Online and Wright's Old High German Primer, which has good information on Old High German orthography and the consonant shift. However it was also published in 1888, so my information may be very out of date. Please correct me if so.