The letter was a DRAFT that was pre-written JUST IN CASE the resolution to expel US troops becomes law.
As it stands now, the resolution IS NON-BINDING.
1) It was voted on by a half-empty parliament with no participation from Sunnis and Kurds.
2) The Prime Minister had not signed it.
If its release was not intentional, someone needs to get a ear-burning chewing out for it. If was intentional to goad the Iraqi government into action, then it makes sense. Soleimani's upcoming terror campaign would have gotten several times as many more Iraqis killed than Americans.