The reason why Mosul fell so easily it’s actually that two-thirds of the troops there only existed on paper as a way for corrupt officers to grab bigger salaries but there was the US paid arsenal with weapons and military equipment for the entire paper army that the Daesh was able to seize after conquering the city later on most of their soldiers were insurgents from Siria that joined the terrorist.
You’re correct that the local Iraqi army was mostly corrupt useless grifters that were there to earn an easy paycheck and harass locals. But local Sunni militias were a large part of the counter-insurgency strategy for the US. A lot of Jihadist insurgency groups had become very weakened in the years before their resurgence.
See More: Shop Trending Shirt