Is the direct mandate’s main purpose to represent the election districts? What was the original motivation to build a mechanism like that (first/direct vote, excess mandates) into a electoral system?
That's a very good question and unfortunately I have never been able to figure it out to my own satisfaction. In German, the whole approach is called personalisierte Verhältniswahl so it seems the main intent is to allow (some amount) of choice over who gets elected on a personal level, rather than only a choice between political parties.
However, the current system did not come about all at once. I gather that for the very first elections to the Bundestag, voters only had one vote that served both as a first and as a second vote (to use the current terminology), a rather unwieldy system.
After that, reforms (including the recent introduction of balance mandates) moved the system even more firmly towards proportional representation. Presumably, a single-district (“majority”) system like in the US, France or the UK was perceived as less democratic so if you still want to allow some form of personal election, you necessarily end up with a complex system.
In practice, the system allows voters to choose a person rather than a party (that's the personalization aspect) and this person effectively represents one district. But theoretically, you could allow voters to pick individual people from a national list without any notion of them representing a district, e.g. with the open party lists used in the Netherlands.
Candidates with a strong local grounding can also help put their party in the parliament, even if it has less than 5% of the vote nationwide. Here, the idea is to guarantee a better representation to (geographically concentrated) minorities. It happened most recently to the PDS in 1994.
And why is it guaranteed that the direct candidate with the relative majority gets already a seat?
Because that's the way plurality systems work. If people get to vote directly for a representative for their districts and one person manages to get a plurality of the vote, it looks very bad if that person is not elected.
What would be the point of the first vote otherwise? Apart from a runoff election (which would cost a lot and suffers from being too French for German tastes), how could it be organized differently? If you want to avoid that, you need a completely different system (single-transferable vote or Dutch-style open party lists, which both have their own costs and complexities).
Wouldn’t it make more sense to distribute the seats for direct mandates accordingly to the second vote from a nationwide (relative) top-candidates list of each party instead of the balancing mandates that were introduced recently?
The way I understand your proposal, the mandates would not be “direct” at all but you would instead have two different list of candidates to choose from to fill seats (the new nationwide list and the regional lists that already exist for all the regular “non-direct” mandates). It's not clear to me why something so complicated would make sense.
Here again, if you are prepared to get rid of the direct link between one person and one district, you might as well get rid of all this “first vote” business and have a straightforward proportional representation like in many other countries (which arguably Germany should consider but that's not on the agenda as far as I know).
Note that for the German federal elections, the representation was already proportional as there are only half as many districts (and direct mandates) as there are seats in the parliament. Excess mandates can create a bit of drama but not seriously alter the balance between the parties in parliament. The plurality aspect (the first vote) is not about creating majorities, it's only about allowing people to vote for one person rather than merely for a party. If you remove that, it has no purpose.
The “balance mandate” is just a kludge to mitigate some paradoxes in the way votes are counted and save this rather complicated system from a recent court case but none of this fundamentally changes the dynamics of the political system in Germany.