Very dirty Sacral chakra and many years of Yehuborim curses. But on a more acceptable level (for example 25 with a 18) can caused naturally by planetary influence. Simply some people may attracted to younger people. In this example that you said, it isn't natural.
I think it's caused by a brain disease; pedophiles have wrong wirings in their brain. I had read this article: https://www.independent.co.uk/life-style/health-and-families/features/a-40yearold-developed-an-obsession-with-child-pornography-then-doctors-discovered-why-a6893756.html. A man had a brain tumor which made him a sex pest
While I believe that someones's fucked up genetics can bring them to that point, porn and sexual degeneracy have a much more higher influence on these things.