Really shouldn't be any surprise, a lot of things were easily believed back in the Middle Ages, before many people were educated, or should I say more so? Anyway, artists (mainly ones who were hired by the church to do paintings) had to make the life the nuns and priests made look more tantalizing and appealing, so they would add their interpretation of what should be, and what people would want to see, in contrast to the hermit like existence that many of them took. So, in this painting, sex is obviously being brought out here to show that even nuns can still experience a healthy sex life with their vows, and that they wouldn't have to worry about not being able to experience it any more. Through this "magical penis tree". Still I wonder what the artist was on when he did the painting though.