the bit you are missing is that you're supposed to owe taxes on the country from where you run your company. So if you run a US company primarily from Germany, by law you owe german corporate taxes.
some EU countries already enforce this, others do not, I know a lot of people do it, but it's...