They do pay tax, 12.5%. Plus employment during construction and maintenance. There's also ancillary investment in national infrastructure such as Google's CO2 battery
The rest of Europe sued Ireland to get them to stop being a tax haven. Ireland basically refuses to do so. If they did, most of their economy evaporates overnight (and the US government gets a lot more tax revenue). Ireland's economy is basically 2 tax shelters in a trench coat.