Why would pedophilia exist?
I am guessing on this one, and there may be some good research on it, but I do know that there can be combinations of genes acting on different behaviors, such that if you have a certain combination of 5 genes, you are a nurturing parent (which would be selected for), but when you accumulate more of these tangentially related genes past some threshold, you end up with non-selected behavior. For example, for homosexuality, which has been shown to be genetically heritable, it may be that 5 genes in a suite make you super attractive to women (thus these genes stick around), while 10 genes combine to make you gay. (Note, I am NOT equating homosexuality with pedophilia in ANY sense. Homosexuality if a healthy normal trait for humans. I am just saying that this is a theory about how suites of genes can be individually selected for while some combination of them is non-selective. Similarly, heterozygous sickle-cell genotype produces resistance to malaria, which is adaptive enough to keep the gene around, which is non-adaptive in the homozygous condition.)
In answer to the other parts of your question, humans are absolutely subject to natural selection. Darwin was dead-on correct about virtually everything he said, to the point where it is frustrating for evolutionary biologists today to work in his shadow, because he pretty much got it all right in 1859. "Theory" is the strongest conclusion that science can ever come to, and people have been trying to tear down Darwin's theory for 160 years without being able to put a single dent in it.