Seems to me that the flight is primarily landing at Shannon for fuel, as it is unable to take off from LCY with a full load.
It seems that the opportunity is being taken, whilst it has to be there, to clear US immigration; otherwise the passengers would still see that additional time at Shannon and then have to, possibly, wait to clear immigration at JFK.