"Enfant prodige is a person under the age of 10 who produces meaningful
output at the level of an adult expert. Why and how do they happen?"
It's because most adults suck real bad. The 'adult' 'expert' standard is in fact a very low bar. Anyone with genuine competence can surpass it as a child, because the competing 'adults' are also still children.
Most can't responsibly captain a vessel for their entire lives. Future admirals can safely captain a vessel at 16.
Most future admirals are held back because everyone is incredibly butthurt about the student surpassing the master. The prodigy has to put in the work, but everyone hates it when they put in the work and it only happens due to accidents and mistakes. Prodigies are rare because there's no point in being a prodigy - you might as well play kickball or whatever until you're old enough to punt the "supervising" "adults" out of your business.
This is also how I dunk on entire fields of science, such as game theory, as a lone wolf. Most game theorists aren't even trying to be game theorists. They're merchants pretending to be scholars and have negative interest in scholarship. Hence "bothers to get out of bed in the morning" constitutes a decisive competitive advantage.