The story that seems to be the most believable is that the generals in Mosul ordered a retreat but with no specific instructions on how to conduct one. Then they jumped in some helicopters and took off to Irbil. The regular forces heard about it and simply broke. The hierarchical and top down structure of the ISF meant that only a senior officer could try to rally the forces and they had left. When that news spread other units they bugged out mostly before the insurgents even showed up. There have been continued breaks in morale but also some examples of the ISF standing and fighting and even launching offensives right now.