He must have learned it in the temple as a monk.
I suspect the stuff we hear about them is just a minute part of the actual debauchery.