Assuming that all pedophiles molest children is about the same as saying that all heterosexual men rape women. Clearly that’s not true. By extension, we can logically deduce that some people have certain other beliefs and desires that cancel out their desire to have sex with a certain type of person.
Finding out the difference between the people who do molest and those who don’t is a very scientific and psychological topic of great importance.
Additionally, this can be applied in reverse. Asexuals are not sexually attracted to anyone, but some would still theoretically have sex with a partner either to give their partner pleasure or because they want to reproduce.
Thoughts do not automatically translate into actions. Often there are certain factors to consider. For example, I desire the taste of cheese because I like it, but after going vegan I eat different things instead because I know that buying dairy funds slaughter of cattle.
The point of all this is to say that nurture trumps nature. Educated people have more information about the consequences of certain actions. There are two main ways people are deterred from crime.
1. Empathy: “I wouldn’t want that done to me.”
2. Fear of Punishment: “I don’t want to go to jail.”
Naturally, if everyone had perfect empathy, then it would seem that crime would be nonexistent.