Like an iceberg, the part of the baby tooth that you see is only about 1/4 the total size of the tooth.
The root(s) under the gum comprise the other 3/4 of the tooth. Permanent teeth start to form before your baby is born. Gradually the permanent teeth lengthen and move toward the surface. As that happens, the root of the baby tooth dissolves away. It's all genetically controlled.