China can be the biggest source of foreign investments in Germany (article before paywall seems to be investment count not € value, but either would work) without Germany being the largest target recipient of Chinese foreign investments. Remember that China is (at nominal GDP which is the kind of thing that matters for trade and investments if not quality of life) the size of the entire EU, of which Germany is just a part.
The other question they may be asking themselves is "where else would we put this money?", which has historically been why the market response to turmoil anywhere has been to invest in US treasury bonds.
Or they may be trying for political or economic influence, owning enough shares to get businesses to buy more stuff from China. Kinda like Musk buying Twitter.
Like when the KUKA, German manufacturer of industrial robots and factory automation systems, was acquired by the Chinese appliance manufacturer Midea Group.
https://en.wikipedia.org/wiki/KUKA
https://chinaobservers.eu/after-kuka-germanys-lessons-learne...