Actually, pedophillia could be damn well anything. It could be that the encoding for human sexuality is so damn complicated that sometimes the system gets messed up, I mean, humans more or less all look the same.
Another theory is that it could possibly be an evolutionary strategy for reproduction; In the past, most males did not get to reproduce. Stronger more able bodied males would have killed them for going near their women. Also, in some strange cases very young girls COULD possibly be sexually mature, and therefore able to bear children, it did happen once. So males who do that might actually be giving themselves a better chance of reproducing, exploiting a source overlooked by other males.
As for why homosexuality is common, the closest the evolutionary view science has been able to come up with is that it is the product of genes which lead to great reproductive success in the opposite sex.
So you can't really reduce pedophilia or any paraphillia down to just one thing.