On taking religion too seriously...
There are a couple of versions of this story...the first one I read had the monk deliberately abandon his practice and deliberately seek bobo (sex) and become enlightened thereafter.
I dont think it matters if the stories are literally true...there is a truth within them about giving up.
The Bobo-roshi
Han-san relates the following story [note: In Japanese, "bobo" is apparently a word for intercourse, and of course "roshi" means master]:
Bobo-roshi is a Zen master, but different. If you like I'll tell you what I know, but I don't know if it's all true; I only know about him by hearsay and I have only met him once. He seems to be an ordinary man but he laughs a lot and he has a very deep voice and he dresses strangely. He never wears the Zen robes but usually dresses in a simple kimono, like artists do, and sometimes he wears western clothes, jeans and a jersey, like you do. They say he has spent years in a Zen monastery, in the southern part of Kyoto. It's a severe monastery, the rules are applied very strictly, more strictly than here. For instance, I believe they get up at 2 a.m. every day. He is supposed to have been a very diligent monk, rather overdoing things even, making extra rules for himself and all that. But he didn't understand his koan and the master was hard on him; whenever he wanted to say something the master would pick up his bell and ring him out of the room. He was treated that way for years on end. He was doing extra meditation, sleeping in the lotus position, trying everything he could think of, but the koan remained as mysterious as ever. I don't know how long this situation lasted, six years, ten years maybe, but then he had enough. I don't think he even said goodbye, he just left, in ordinary clothes, with a little money he had saved, or which had been sent to him from home.
Now you must realize that he had been a monk a long time and didn't know anything about civilian life. He had never climbed the wall at night [i.e. sneaked out of the monastery as many did for less, umm, spiritual pursuits]. He was a real monk, sober, quiet, always in command of himself. And there he was, in a sunny street, in a busy city, thousands of people all about, all doing something, all going somewhere. He wandered about the city and found himself in the willow quarter, perhaps within an hour of leaving the monastery gate. In the willow quarter there are always women standing in their doors, or pretending to be busy in their gardens. One of the women called him, but he was so innocent that he didn't know what she wanted. He went to her and asked politely what he could do for her. She took him by the hand and led him into her little house. They say she was beautiful; who knows? Some of these women aren't beautiful at all but they are attractive in a way, or they wouldn't have any earnings.
She helped him undress - he must have understood then what was going on. She must have asked him for money and he must have given it to her. Then she took him to her bath, that's the custom here. Your shoulders are massaged and you are dried with a clean towel and they talk to you. Slowly you become very excited and when she feels you are ready she takes you to the bedroom. He must have been very excited after so many years of abstaining. At the moment he went into her he solved his koan. He had an enormous satori, one of those rare satoris which are described in our books, not a little understanding which can be deepened later but the lot at once, an explosion which tears you to pieces and you think the world has come to an end, that you can fill the emptiness of the universe in every possible sphere. When he left the woman he was a master.
from The Empty Mirror, by Janwillem van de Wettering, 1972
Enlightenment Stories of satori, samadhi from the Zen tradition