The licensing money have probably helped the Fraunhofer Society do more research. Now whether that is the way you think research should be founded, and whether the net cost to society has been larger than the gain is another question.
For context, Fraunhofer Society is a massive public-benefit organisation aimed at applied research: while it gets some public funding, that public funding is given according to how much they make in industry contracts, which are the primary source of income. The idea behind this model is that they have room to do work that's not immediately profitable, but on the other hand have to keep applications in mind and work effectively to still get industry work.