This has happened in some form or another in many instances, as explained above. Another example I can think of were some of the forces in the Spanish Civil War, where officers were elected, but this was largely on the small unit level, and there were still people in charge.
One major thing is that while the current rank system is indeed descended from those aristocratic concepts, the hierarchy they represent is pretty well essential to modern tactics. You need designated people in charge of other people, and other people in charge of those people, in order to get things done quickly and efficiently. In order to actually exercise initiative and respond to a changing battlefield, you need people at each level who can observe the situation and give out orders that will actually be followed.
Wars cannot, at this point, be effectively fought by gaggles of people all operating independently. It's fought by units of people who support each other and help each other complete a shared mission. The only current way to do this quickly is by having trusted and trained individuals giving directives that the people below them will use their own authority and training to achieve, down to the individual soldier. And in situations where the pecking order is unclear, it's very helpful to have a detailed rank system so that it's clear who's supposed to be in charge.
Obviously, people of higher rank still need to listen to their subordinates if they want to succeed, especially since they're often dependent on them to determine and describe the situation. However, in terms of authority, a clear rank and unit structure is really, really helpful.