it might have been both. The guy was probably abused as a boy (traditional Pathan culture) and then grew up with per tendencies. Then was rejected and turned to the ole time religion to get his revenge
Muslim culture is kind of like the Romans - sex between equal men was immoral and illegal, but sex with boys was OK or even acceptable as mentoring and contraceptive.