Third-party funding has NOTHING to do with this. Otherwise, regular companies could also save on permanent positions by using some project durations.
There are special regulations in the Higher Education Act for universities that limit the maximum employment duration. It is politically desired and intended (yes, also by the universities) to employ staff for a maximum of 5 years, with various exceptions such as parental leave, for example. Universities are training institutions and are supposed to train doctoral candidates for the private sector. Then with a doctoral degree. Otherwise, permanent employees would block a scientific position for 40 years. That would be a death blow to science.
By the way, large institutes can also employ scientific staff permanently at will. This works quite simply through bilateral industry projects and the free funds generated from them. The institutes all have affiliated GmbHs. Of course, they still only grant permanent contracts as an exception. The people who get such contracts do not stay long. Professor Günther Schuh with flying taxis was recently on the news again. The good man has a huge network of companies alongside his chair and his Fraunhofer department.
That is not entirely correct:
1. The maximum duration is set at 6 years, or more precisely, it is 6 years for the doctoral degree/advanced qualification and then another 6 years, so a total of 12 years. In the case of a habilitation, I believe there is another 3 years, but I am not sure about that.
2. Saying permanent positions are a death blow to science is, to put it mildly, absolute nonsense! With the current approach, it repeatedly happens that people who want to work scientifically and very well end up going into industry. Sure, this may bring in new forces, but for some projects, this is rather a problem due to the necessary familiarization time.
3. Yes, there are enough institutes where the head has GmbHs on the side (see Prof. Schuh), but that cannot be the solution in the end. If you see that there is a manifold higher demand for positions, then there must also be options to employ people permanently. Fundamentally, this is even possible with third-party funding, but this has the consequence that the earnings of that person must be secured by a corresponding capital investment until potential retirement, which almost never works.
The Wissenschaftszeitvertragsgesetz (Scientific Fixed-Term Employment Act) is by no means only positive, and arguing that otherwise others would be denied a doctoral position is also questionable. There are enough institutions that use doctoral candidates as cheap labor; the doctoral candidate then works full-time for their time and in the end finishes their dissertation while on unemployment benefits. Unfortunately, this is common practice in some areas!