This is actually one of the central points of the book "Mindstorms" by Seymour Papert, who invented the Logo programming language. He contended that the early sorting of children into good/bad at math is a self-fulfilling prophecy. That children who are told they are good at math seek out math, while those who are told they are bad at math actively avoid it. And you can see this effect decades later. My wife was told she was bad at math at a young age, and despite getting As in algebra and trig, and an A in physics, she still thinks she's bad at math. Even after objectively measuring that she performs within the top 10% of her peers at a particular subject, she still thinks she's bad at it. That's how bad this is for children.
The irony here is that I first learned the Logo language in one of these enrichment programs.