Security and civil order are the responsibility of an occupying force.
Conversely, if a country provides aid to militias, it is morally complicent in their acts.
One of the biggest problems with your response is the concept that there are even clearly identifiable ‘sides’ in Iraq. Us and Them plays well on Fox News, but bears no relationship to the complex, multi factional reality of violence and conflict in Iraq.
Take the recent Shia/Shia conflicts. The simplistic view would be, Us backed ‘good’, Iran backed ‘bad’. But that has not been the reality. All Shia groups get aid from Iran, the US was actually backing the group with the strongest ties to Iran. Not really intentionally, but because we got forced into pre-election power play by our current would-be sock puppet.
When you look into US/Sunni relationships, it becomes more convoluted still. As with some Shia groups, we are aiding and arming groups who, in turn, attack US troops, often with the more sophisticated tactics we just taught them.
Small wonder that 5 years and $750M a day and we still cannot secure the fortified Green Zone or the short road to the airport. It makes Pope John Paull II’s warnings look all the more astute.