Revisiting the fall of Mosul: Who was to blame?

On 5 June, 2014, hundreds of ISIS militants launched a lightning assault on Mosul, Iraq’s second largest city. As a result of the mass surrender and desertion of the Iraqi forces, ISIS took full control of the city on 10 June, just 5 days later. The group looted banks, freed prisoners, and captured significant amounts of US-supplied military equipment in the process.
But how did Mosul fall so easily? Why did four divisions of the Iraqi army, some 50,000 soldiers, withdraw without a fight in the face of just hundreds of ISIS militants attacking the city?