> Shouldn't they be paying those taxes in China or the US?
Well for one, Apple contracts out the manufacturing of the products to multiple Chinese companies so I fail to see what taxes on profits they would be paying in China wrt manufacturing.
The EU(~508m ppl) is not the US. Apple have a massive presence in Ireland dealing with everything EU specific from before the products hits the shelves to after they're bought.