technically it's not illegal, but completely immoral. Imagine if I channelled all my PAYE taxes through an offshore company, who would pay for our health system, infrastructure etc.
They're not expanding to Ireland. That's the point. Now they route all transactions from non-US customers through the Irish subsidiary and keep their money over there. They pay up 15% or whatever the tax rate is instead of the 35% over here. They keep the profits there waiting for a tax holiday, then move the money back when that happens. They can probably even claim the 15% as a foreign tax credit during the tax holiday.
Pretty simple. :)
While not illegal, it's a little bit dodgy. But it's what everyone does these days, so why not?
I'm not suggesting that is why Dropbox are moving to Ireland. I'm saying that if that was the reason as brought up by the OP then they should be aware of current events in the UK where companies like Amazon are making billions of pounds in the UK and paying virtually no tax - even though they use our roads and infrastructure to conduct their business.