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)
Edit: Maybe I should give an example: Lets say you build up a company, your shares are worth ~100k, while you payed yourself a living salary of ~2k so you could pay rent and buy groceries but not much more, especially no savings. Now you get on offer to work in the US for 180k/a, you sigh "finally" and just want to move, but the German wants 30k Taxes on your unrealized ~100k capital gain before your leave - Is this the kind of situation you are referring to?
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.