It relies on the fact that Irish tax law does not include transfer
pricing rules. Specifically, Ireland has territorial taxation, and
does not levy taxes on income booked in subsidiaries of Irish
companies that are outside the state.
It's also worth noting that Ireland has passed tax reform to render this not possible any more.