Pedophilia isn't totally an evolutionary trait, but rather a social construct. In terms of reproductive success, it makes sense to impregnate anything that you can, and many girls can actually give birth before 10. Age of "consent" laws, for lack of a better original term, didn't even exist as a concept until a few hundred years ago, and back then they were only limited to girls under age 8. Even just over 100 years ago, it was possible to have a child bride of 10 or 12 in the US and live normally.
For various reasons, the 18 yo age was implemented quite abruptly, and now we're trapped in a world that shuns what was normal behavior for thousands of years of human history. The concept of a pedophile only truly came into being in these last 100 years.