The military will be a crucial actor during a zombie apocalypse. The military is a kind of society within a society, not only composed of soldiers but doctors, engineers, mechanics, &c., all highly trained for combat situations. This is why it is crucial that they remain under civilian control: They are essentially a mirror of ordinary society but composed of stronger individuals. Without that guarantee of civilian control, they take it over through their superior prowess and discipline, as has been the case throughout human history, as we see in cases ranging from martial law to full-on juntas.
As we saw in the Season 3 finale of The Walking Dead, the difference between armed individuals and soldiers is discipline. Although the Governor had many more people than Rick, it did not take much for them to flee. When complaining to the Governor of what they had to go through, a woman exclaims: “We’re not soldiers!”
Worth noting here that when I say discipline, I am speaking more precisely about military discipline and not everyday, individual discipline. In military theory, discipline is just about as important as weaponry or training. Soldiers will not do what they need to do if they do not have discipline: “Discipline is behavior tempered by high moral standards. It is the willing adherence to the organizational values and to the shared expectations of the unit, even in the absence of supervision” (ADP 6-22).
Carl von Clauswitz, who first saw war is a science, dedicated much thought on discipline. He realized that war is fundamentally danger; thus, orders can only be successfully carried out in the battlefield if the soldiers possess personal courage. That is to say, the first and primary quality of the soldier is courage—this, when embodied, is what we call discipline.
It is not reasonable to expect that everyone in a settlement will have the discipline to become a soldier. At the soonest possible time (but no sooner), a settlement must create a professional class of order keepers. These people must have no duties, or barely any other duties, apart from maintaining the peace. Whatever time they have outside of doing their work must be spent training.
Just as crucial as any work they do and every bit of knowledge they have regarding weapons, formations, tactics, strategy, &c., is discipline. They must follow orders, even in the face of extreme and deadly danger. Otherwise, they would not have the fortitude to enact that knowledge, and so it would be essentially useless.
Discipline is particularly important when certain actions that need to be performed involve an emotional element. For example, there might be times when members of the group must be dealt with harshly. Sacrifices might need to be made that affects the weakest members. There might be extreme circumstances wherein innocent people may be hurt. In such cases, ordinary people might not be up for the task, and a highly disciplined class is needed to accomplish them.
Once again, this is a material necessity that goes back to the dawn of human civilization. The warrior class was venerated for a reason, and until today the people we know as nobility are people descended from warriors (which is why many members of royal families around the world are given numerous military honors, even if they have never substantially served in the military). But although our material capabilities return to the ancients, our values do not, which makes handling an armed force more complicated. Which makes discipline much more important, not only in terms of spurring people to action but in curbing our baser impulses.