And it’s not because the teacher was “hot”:

The researchers don’t think that sexual interest explains the results, which held up whether the teacher and students were of the same sex or not. This suggests, they write, that the improved student performance was “driven by processes independent from human sexual attraction, such as attention and motivation.” Or, as one of them put it, it’s just human nature.

https://apple.news/AZxFfNqxDQ4aBqFiRBAkvng