Pension funds buy shares in businesses such as Microsoft. The money going into the pension fund is not typically a function of the tax paid by companies such as Microsoft, but rather from a combination of actuaries’ recommendations, payroll tax receipts, and politicians’ priorities.
Therefore a pension funds’ equity holdings, such as Microsoft, doing well means taxes can be lower.
Even in the USA, Social Security defined benefit pensions are cash from workers today going to non workers today, same as Germany's national scheme (gesetzliche Rentenversicherung?).
How's that different than any other sort of R&D incentive? Would you rather that companies return as much money as possible to shareholders, future growth be damned? What about other sorts of tax incentives, which by definition also "just a loss for governments"? Are tax breaks for people with kids also "socializing the losses", given that most households don't have kids?
So just a loss for governments, or in other words, socializing the losses.