The U.S. military has a minimum IQ requirement of 83. They determined that below that, they actually put more resources into the person than they get out of them in productivity, meaning the person is less useful than if they didn't have a position, they are literally worse than not having anyone doing the job. They also found that they could not use really low IQ people (not below 83, but really, really low) in the field as combat troops because they were literally helpful to the enemy, meaning that they would just as likely shoot one of their own fellow soldiers in a friendly fire situation than they would be to engage the enemy because of the confusion on the battlefield.
These issues you are running against are taboo to discuss in the modern education system in which the narrative that anyone can do anything as long as they apply themselves, and as long as they have the property resources and opportunities. The simple truth is, ... some people are never going to be lawyers and doctors. It just is what it is.
For the brutality of the before times in the early 20th century, etc, when people were being abused in mental institutions, etc, people did realize that people had different levels of ability, and instead of trying to teach everyone algebra, a lot of people went straight into jobs, working on farms, into various trades as low level helpers, manufacturing, etc, not everyone was put on a track to go to college or pressured to learn subjects that they were never going to be able to learn.
It's definitely a touchy subject to discuss in modern society because it's completely counter to the idea that everyone can do anything if they are just given the opportunity. And, frankly, it's sad, and nobody wants to talk about it.