When a national security establishment prioritises political loyalty over professional excellence – armies fail and many, many people die.