I think that they are born with pedophilia as a sexual preference, and are then susceptible to developing the mental illness. Some people argue that exposure to child porn increases the probability that they will develop the mental illness via desensitization and becoming part of a community. However, I firmly believe that even if child porn increases the risk of child molestation that it should not be illegal as not everyone will progress down this path. And a counter argument that has a decent number of scientific studies backing it is that child pornography is a sexual release for all sorts of pedophile, and will lead to reduced child sex abuse as it offers an alternative to actual child molestation.