Biology trumps all- except denial
There is a woman I have known since I was a teenager. She has been a friend of one of my sisters since they were pretty young. Her husband was a youth director at a church. He apparently got caught "hitting on" (sexting? flirting with?) "young people" and lost his job. And lost his wife. He admitted doing it, and said he "has had this problem for a long time". (I neither know nor care whether he actually did anything physical.)
There are plenty of legitimate reasons his wife could be angry at him or dislike him over this. His violation of their marriage contract, for example. Or the loss of his job. Maybe even the fact that he used his position of "authority" as a way to find extramarital adventure.
But not because of who he is attracted to. That isn't a "problem", it is basic biological programming. Yet this is her apparent justification for ending the marriage in disgust.
Once a young person develops secondary sexual characteristics they become attractive to any normal sexually aware human (of whichever sex is attracted to their sex). And, no person who is attracted to these sexually-developed young people can be honestly called a "pedophile"- these are not "children" in any meaningful sense of the word. The artificial extension of "childhood" is a tragedy that is having disastrous social consequences, of which this subject is just one example.
Throughout most of human history, people of this age were sexually active, married, and reproducing. It is not "wrong"; it just is what it is. Youth is also attractive since that is a marker of "good breeding potential". Sounds crass, but it is true, biologically and psychologically. People can lie to others, or even to themselves, about this attraction, but it doesn't change the reality of the biological programming.
This biological truth trumps religion. It trumps "law". It trumps a wife's wishes. It even trumps social programming and the risk of self-loathing.
I suspect a lot of people who find a job working with young people seek that kind of job specifically because of this stimulation. Most of them probably never act on it due to social taboos, and they may not even recognize this attraction in themselves because of how they have been trained. But it is there. And sometimes, in some people, it will come to the surface.
As long as it is mutually consensual, no "law" can make it wrong. If it isn't mutually consensual, no "law" can make it right. And that includes sex.