I wish it were that simple, but unfortunately pedophilia still exists even though it fits all your criteria. Clearly some people adopt sexual behaviours even if it could lead them to a terrible outcome. Actually, some might do it specifically for that reason and the thrill of it.
You could make the same comment about religion, drugs, literature, politics etc... It's not rare for humans to adopt behaviors that put them at risk even if there are no obvious benefits. People routinely endanger themselves while doing kinky things. There probably are more kinks out there than there are genes in the human genome. There's clearly a large number of factors at play here, only some of them genetic.