The scene opens with a very sincere, somewhat timid and very correct professor getting cornered by an attractive blonde with either sex or an "A" grade (perhaps both) in mind. This is basic stock material for a sitcom or at least a teen-oriented movie.
Hips don't lie, as Shakira sang; and perky protuberances provide some further temptation.
"Ohhh, Professor. . . . I really need an "A" in my Lit class. Is there anything I can do?" [Corners him against the blackboard while grinding her pelvis against him]
"Well, Ms. Jones, you might spend your time studying for it."
For young and no-so-young adults, the opportunities for meeting new people become drastically limited after the time they attended college. Mostly, they see people in their workplace. But dating a co-worker can be risky business. For some people, taking a college class (especially a continuing education class), is seen as an opportunity for meeting members of the opposite sex. And all the better if the professor or other student is handsome!
So this is both the real life and the fictional fantasy. In the movie, the professor is always handsome and distinguished. The flirt is always sexy and beautiful; and is willing to offer sexual considerations to get what she wants. In some cases it's the grade; in others, it's snaring a prof for a mate.
Maybe a rom-com, in which the professor gets saved in the nick of time by the love and attention of a nice woman, who manages to eclipse the unsubtle approach of the bold woman, who gets her comeuppance in the end (plus the "C" or "D" which she rated). Real life is not so neat and tidy.
I made an iron-clad policy when I went to grad school: don't date profs in my field. And, obviously, no married guys, period.