Apple - and the rest of the large companies manage to order their payments so that their profits are offshored out of Europe. Which means they are not paying the corporate tax an EU resident company would. So EU is not getting their fair share.
Corporate tax doesn't go to the EU, it goes to the government of the country you're incorporated in. Countries like Ireland and the Netherlands have very low tax rates, and big tech companies benefit from that.