And all those systems have one thing in common. They have their roots going back to a time when such prejudice was allowed. Upper class vs lower class as in the case of CO vs NCO. Men vs women as in the case of doctors and nurses.
That may have been where they originated, but even today those origins have no bearing on the classifications. For example, in the medical professions men and women now equally occupy the positions of doctor and nurse that it's almost easy to forget that at one time the two jobs were gender-segregated.
Indeed, these days there are people who though interested in the medical profession, don't want to go the whole way of becoming a doctor and are satisfied as being a nurse. This does not make them lazy, far from it as the daily responsibilities of a nurse are arguable greater than that of a doctor, nurses being more of a hands on specialized duty, doctors being more generalized supervisory role.
It's similar with the officers/enlisted divide. Sure, it started as a class segregation, but that does not mean the system itself doesn't have practical applications in the modern world, or even in a future world where equality reigns and there is supposedly economy. Like doctors and nurses, the enlisted/NCOs are the hands-on specialists responsible for doing the work, and the officers are generalists with a supervisory role. People who enlist rather than going the route of becoming an officer aren't lazy, they simply have no interest in the life of an officer.
You see this kind of divide in all manner of occupations in all walks of life. It may have started as class segregation, but the simple fact of the matter is you need this divide in order for work to get done. Eliminating the system isn't the solution, a more logical solution is getting rid of the notion of people are only suited to one particular role based on their status in society which is a result of nothing more than the families they were born to, or at least raised by. But even in today's world we have already put the class system behind us, and by Star Trek's time it shouldn't even exist. Meaning if someone from a privileged upbringing wanted to enter Starfleet in the enlisted ranks, they would, and likewise if someone from a less fortunate background could enter the Academy provided they met the qualifications, and provided they worked at it and graduated, they would be an officer.
Don't judge a system by its origins. Otherwise, one could point out that even exploration itself doesn't always have rosy results, historically speaking.