You specifically cite the German example so I will provide some German input.
In the consitution of the Weimar Republic of 1919, the president gained a position that is often referred to in history books as a replacement emperor. He had vast powers, appointed the government, could dissolve the parliament and decree ‘emergency laws’. He was elected for a seven-year term and could be reelected indefinitely. However, the Weimar Republic only lasted until 1933, 1934 or 1945 (depending on how you count) and there were only two people elected into office: Ebert, who died in office in 1925 and Hindenburg. Hindenburg was reelected once in 1932 but died in office in 1934. (Thereafter, Hitler took charge of both the office of chancellor and president, but that is another story.)
If the modern German constitution is limiting the terms of the federal president because of the experiences with Weimar, it is not doing a good job. Hindenburg would have been able to have exactly the same terms in office and the single reelection he enjoyed. Instead, the so-called constitutional safeguards are not giving the federal president any true political power: the office de facto only performs ceremonial duties although a number of presidents have taken a slightly more active interpretation of their role in German politics.
On the other hand, there are presidential positions with real power that are still term-limited – sometimes more, sometimes less effectively: Compare the constitutions of the USA (powerful president, hard two-term limit) and Russia (powerful president; only single reelection possible but after stepping down for one term a president can be elected again, see Putin/Medvedev). In both of these cases, the term limit was introduced to limit the power of the president in some way or another and were in place years before the current office holders. For comparison, in France a term limit was not enacted until 2008 but only two presidents served two terms (the current limit) prior to 2008.
Taking all this evidence, it seems reasonable to assume that political power and limiting it cannot be the reason for enacting term limits for president.
Instead, term limiting the president in representative democracies may serve as a method to get an office holder more independent of day-to-day politics – like a supreme court judge would be desired to be. If a president could be elected over and over, they might be tempted to start pleasing those who elect them as people do get attached to offices they hold. Providing a clear term limit means that such a tactic is not going to bear fruit as there is a clear end to it anyway. This, in theory, ensures a more independent and neutral balancing institution. Indeed, in Germany the party affiliation of the president is completely irrelevant for the ruling government; it is the composition of the Bundesrat that determines how easy or hard governing is.
On the other hand, term limiting a prime minister, chancellor or whatever name the head of government goes by sounds like a much more effective way to limit personal political power. Germany certainly has had a number of chancellors that have towered over certain eras: Adenauer, Kohl and Merkel each ruled for more than a decade and each held great political power while doing so.
However, they are much closer to the actual happenings and much more susceptible to replacement not only by getting voted out of office. In Germany, chancellors can not only fail to get reelected following a general election but the parliament also has the option of retracting its support and voting for a new chancellor. This happened in 1982 when the social-liberal coalition broke apart and Kohl was elected as a new chancellor to replace Schmidt.
This may be a weak overall argument. Arguably, if a German party gained and held as much popular support as Putin’s party did in Russia, chances are that a lifetime chancellor would emerge – if they don’t trip over any petty affairs, are dropped by their own party on whose votes they depend or similar things happen. Adenauer eventually fell (or rather: was dropped) because of dissatisfaction with the ‘old man’. Brandt might have arguably become a similarly important chancellor had he not been targeted so successfully by an SED spy and had to resign. So maybe Germany was ‘just lucky’ that no strong, overarching figure established themself.
(Rereading the above paragraph one year later and I notice that the description applies rather well to Bavaria where the CSU dominated the political system, gained absolute majorities in every state election from 1962 to 2003 and the minister presidents Goppel, Strauß and Stoiber ruled for 16, 10 and 14 years, respectively. Goppel resigned due to old age, Strauß died in office. Stoiber made numerous political mistakes in his last year that ultimately forced him to resign in the face of public pressure; his mistakes and his unsuccessful successors damaged the reputation of the CSU so much that their support fell from 60.7 % in the 2003 election to 43.4 % in the 2008 election.)
I guess the only real answer to your question will turn out to be: there’s no real reasoning, it just happens to be this way.