That is a good question, how governments tax international flights. They all tax a flight which departs or arrive in an airport of their country. So flying from Ireland to escape taxes is not illegal, since it would be the Ireland taxes that apply to your flight.
However, these sales taxes make a little part of the "fees and taxes" that often take a large share of the price of a flight. Usually these include fuel surcharge and airport fees, i.e. the price the airport requires to pay the facility's costs, such as the security, the boarding, ...
In an article about a speech by SouthWest Airlines CEO on the topic, the details of taxes and fees is given, and the only tax to be considered a sales tax in the US is the "excise tax", worth 7.5% on domestic flights and around 15 to 20 USD on international flights. In some countries like Ireland, the sales tax is zero. In UK, the Air Passenger Duty, the sales tax for flights is worth about 80 GBP for your flight.
In some countries, including UK, Brazil and France, there is an extra tax (decided by the governments) on international flights, to finance the Unitaid initiative.
So overall, the rule is to pay sales taxes on flights depending on where they depart and arrive, not on your passport or point of sales.
As @mkennedy suggests, be careful when booking your flights, if you have any delay in the first leg of your flight and you miss the second leg, you will likely not be offered a later second leg or a refund.