Maybe I am missing the point, but what is the alternative? You found a company in Germany, dont realize your gains, therefore dont pay taxes, then leave the country, realize your gains, and still dont pay taxes? Why should Germany or any other country allow this?
As long as Germany and other countries allow foreign companies to do business with their subjects, then foreign companies will be at advantage to domestic companies because of the exit tax.
If they want to be strict about it, they should only allow German companies to do business with German subjects. Then there wouldn't be an advantage to foreign companies.
The issue is liquidity. The tax comes due as soon as you leave, but you might not be able to liquidate your shares quickly enough to be able to pay those taxes. Depending on how your company gets valued these can be eye-watering numbers.
This is something you can solve with enough time, but if I get a job offer where I'm supposed to start in 2 months? Very inconvenient. (There are some ways to spread this out have this tax burden spread out over time, but it still represents significant friction)