The age limits in gymnastics and a few other sports where petiteness is desirable were introduced to discourage eating disorders in competitors.
The reality is that there is some advantage in some sports by being light and short and thin. An eating disorder will never compensate for the right genetics and the right training program.
For the same reason many fashion shows and fashion makers have banned models below certain sizes or ages.
A partial compensation has been the IOC introducing minor Olympics; but that still enforces unjustified age bans and doesn't allow the best minors to face older people who are at their level.
I don't know at all but I suppose skateboarding isn't subject to the same rules, and I assume as you do that it's a decision made and enforced at the level of the world federation, not the IOC. Apart from the cases in skateboarding, I know of a Syrian underage girl playing table tennis, and in previous games of underage archers.