The Spartans did that as a part of apprenticing. A man would tutor a boy until he became of age. In return the boy was basically the man's servant, doing anything the man needed. This included sexual favors.
I don't know if this was practiced outside of Sparta, however.