However, the copyright holder can grant another party unlimited usage rights as well as waive the right to be mentioned as the actual copyright holder.
Both of these might apply here: SAP's and Deutsche Telekom's employees most likely have waived their right to be mentioned as individual copyright holders (which is a common stipulation in German employment contracts) while SAP and Deutsche Telekom have not, which is why they are mentioned as copyright holders instead of the Federal Republic of Germany.
Like even as a developer, it's just in your employment contract that you grant all rights for work done for the company to the company.
Especially software developers should read those parts of their employment contracts carefully, as they may be overly broad and sometimes accompanied by weird clauses regarding their OSS work.
I don't know about the exact implications for creating very similar future work (what you would call "infringing copyright") though.
German law has a clear distinction between authorship rights and usage rights. Usage rights, including reproduction, can be sold, rented, perhaps even taken illegally at gunpoint, I don't know. It's just your run off the mill intellectual property. But authorship rights cannot be transferred at all except through inheritance, it's simply impossible for A to pay B to relinquish the right to state that B is the creator of X. But outside of literature and music where special compensation schemes exist this is only about recognition and has zero economic relevance.
This authorship right is also only available to natural persons, so it's clearly not the reason why SAP and T-Systems are still claiming copyright. It just wasn't something the state buyer cared about and given that they apparently did care to get the code under Apache 2 I can't fault them, the result is almost like a reimentation of the recognition part for companies instead of natural persons.
To your question, yes you can inherit something from your grandmother. Inheritance is designated by the original author, and enacted in the event of their death (As far as I can tell).
Source: https://www.gesetze-im-internet.de/englisch_urhg/englisch_ur... (Section 28)
Another implication that occasionally comes up to freak everybody out is that there is some legal basis for creators to have a word in changes to their work, which can be a total PITA for organizations that once commissioned a building from a famous architect who left assertive offspring.