Actually, that's exactly what will happen. You'll do the job. Then you'll learn how to do it well. Then your job will be to teach others to do it well. Then you'll become an assistant manager, making sure people have the training and equipment to do it well, and handling problems that others don't have the experience for. Then you'll become a manager because you know how to handle people and make that part of the business succeed. Then you'll become a higher level manager because you know how to make a team of workers successful.
That's not a far-fetched scenario. That's exactly what happens in many organizations. It's not the only way into leadership, but it is a well-trodden path.
To make a long story short, today I'm a Senior Software Developer at a large company. I'm happy enough without any aspirations to management at this time :-)
I agree with you that you don't learn a lot of great marketable skills by scrubbing things clean. But such a job, by itself, can't stop you from learning if you're determined.
But consider, if a HS dropout could learn how to wrench on a car for $2/hour, maybe they could get a full auto tech position (at a living wage) later on, without the crushing debt of trade school.
That may not make them a manager, but there are jobs that pay higher than minimum wage that require the ability to clean as a skill. Often those jobs come with new skills to be learned. And yes, someone who has some degree of management potential could definitely start out cleaning toilets for minimum wage and work their way up to managing the cleaning staff somewhere.
The guy yelling at the toilet scrubber doesn't have his job because he is particularly skilled at yelling at toilet scrubbers.