When Marx used the term 'class', he wasn't referring to hierarchical organizational structures. He was referring to more-or-less permanent and impermeable social distinctions. For the sake of the argument, assume it is well accepted that a company of any reasonable size must have (at minimum) a chief executive making global decisions, an assortment of managers implementing those decisions, and an array of workers carrying out the implementation to produce whatever the company produces. The question is this: where do these people come from? If we have a situation such as the following:
- Chief executives are always chosen from within a specific group: e.g.: business owners, other chief executives, their children and extended family members.
- Managers are always chosen from within a second group: e.g., people who have the financial means to attend college and achieve an MBA; distant relations of the first group; entrepreneurs who were able to bankroll their own success.
- Laborers are always chosen from the rest of the population.
These then represent three distinct classes of people. The classes aren't defined by the positions per se, but by the fact that it is extremely rare (if it happens at all) to see someone from the third group rise to the level of the first group, or someone from the first group to fall to the level of the third. This lack of social mobility naturally concentrates wealth and privilege among the highest class, where even the most incompetent member of the highest level lives in luxury and comfort inaccessible to even the most competent and talented member of the lowest level.
Marx held that the basis of class structures in all societies was control of the 'means of production': that (whatever it is) which is an essential prerequisite for production to occur. In the Feudal era this was land ownership: land was essential for agricultural production, and land was owned by the aristocratic class, who wielded political authority and took the bulk of the profits. In the Industrial Capitalism era, the means of production was 'the factory' (since no individual can effectively compete against a factory), and so those who owned factories — the industrial capitalist class — held de facto political, social, and economic power.
In a classless society there are still hierarchical political and economic positions, but no particular group holds dominance over the highest levels. Every person in the society has the same base chance of becoming a political or economic leader, based solely on his/her skills, talents, and inclinations. The point of nationalizing industry in this model is take control of the means of production, so that the means of production cannot be used by one group to wall off people of other groups. It isn't about bringing everyone to the same level; it is about allowing the natural abilities of everyone to express themselves without being restricted by some artificially imposed conditions based solely on accidental characteristics of social position and birth.