As for why this Iraqi group is able to attack USA, it's likely much more to do with the 13 year old failed US Invasion of Iraq than anything to do with Iran. But It feels like USA is embarrassed enough about that whole thing that they have decided to just ignore that Iraq exists and instead consider this to be an attack all along the Jordan-Iran border, which for anyone geographically interested is just as long as the border between USA and France.
The sense I get is that this is looked at somewhat as Avon Barksdale had given all his crews orders to shoot any members of the Stansfield Organization on sight, and, after a bunch of bloody shootings, tried to claim "oh, I didn't order any of those attacks specifically". That argument wouldn't hold up in court, where the standard of evidence is relatively high; it definitely doesn't stand up in the court of USCENTCOM, where the standard of evidence is probably mostly vibes.
…backed by Iran.
Most Iraqis still remember tragedies like the Mahmudiyah massacre. The government of the time took them into account and promised to have American bases closed, but reneged. I think you can see how events like that being rampant might drive people to fight, even a generation later.
Maybe instead the US should honor their commitments which would include the Iran Nuclear deal that was scrapped for no reason 5 years ago.
I'm not going to speculate how good it would to attempt regime change right now but there was a very good opportunity for it when Iran had unrest and they came to a genius idea to murder around 15000 arrested people.
The best opportunity would have been of course when US had sizable military formations on both sides of Iran border. On top of it it would have very likely limited large number of civilian causalities in Iraq due to reduced activity of Iran backed terrorist cells.