Based off the timeline as I've understood it, Sekai seduces and grooms Sensei, Sensei becomes friends with and dates Niki, Noriko becomes attached to him, Sekai dies in a wreck, Sensei disappears from Niki's and Noriko's life, and takes Ami with him. Afterwards, he became a tutor and reconnected with Noriko, meets and tutors Maya, eventually stops tutoring, disappears from Noriko's life again, becomes a teacher, meets Ayane and Maya as friends of Ami's from school, and Ayane (and likely Ami) becomes obsessed with him. Years later, he has became a high school teacher at an all girls school during a space war (?), impressed Makoto and Futaba, started creeping on/counseling Yumi, and then something happened and the loops started. Somewhere around tutoring Maya to teaching the current class, they started a relationship in secret.
After countless loops of Sensei seducing and grooming everyone then being reset, current Sensei awakens. I think the countless loops of Sensei being with the girls in various ways is what makes them so taken with him. They may have been reset but the familiarity remains, which I think Maya mentioned at some point.
Overall, I'm not entirely sure how Sensei's and Maya's relationship was before the loops. Most things that hint at it seems to show a teasing romantic relationship though. Hopefully with how Maya has become, she'll eventually reveal more and more, and even more hopefully, any reveals won't reset Sensei or herself.
Of course, any of this could simply be what the characters think happened instead of what did, and the gods are just mind screwing them into believing it for some unknown reason. If any of them was ever "real" in the first place.