Children are legally differentiated from adults purely based on age, not some formal verification. You get extra rights and obligations at 18, that’s a very objective criterion.
Declaring someone mentally unfit is anything but objective and it’s very ripe for abuse.