Yes, but it creates issues for the students who don’t have the advantage of sleeping with the person who gives them their grades.
I agree with you. These relationships should be discouraged, mainly on the abuse of power grounds. And I agree, they raise questions of fairness, even if the teacher is fair to the others in the class.
And also, relationships in advanced education are essentially between adults, so even if you have a wide disparity in ages, they are both ostensibly old enough to made informed decisions.
It’s best if those college and grad school relationships are put on hold until the student finishes the prof’s class.