"What happened to the girl he loved"
- Things might have been platonic / friendzoned
- She died. He's a widower mourning.
- She doesn't know him yet. Do you seriously expect him to hold celibate if she doesn't?
- There might have been TWO GIRLS, mate. Pay attention!
I understand, that such a thing as shipping exists, but please be aware, that the shipping exists for YOU and not for the characters involved. No one waits for their future, potential, not-yet known spouse - that is absurd.
"Suddenly sex?"
And why not? Are they not adults? Are they not feeling loneliness, despair, frustration? Can they not comfort each other in that way? She said VERBATIM, that she will cling to the MC, because he's her last hope for finding someone who won't betray her. He in turn has already been established as an emotional pushover that just flows with the winds when it comes to emotional engagement with the world. He's a borderline sociopath and thus he doesn't really express himself, but rather mirrors other people. And accepting her offer is the ultimate mirror.
Ultimately MC is utilitarian - this move solidifies the girl's commitment to the clan, which is what he wants. He also gets to unwind and ease up the tension he's constantly under in the arms of someone who won't dare to question him and also is not bound by neither the student-teacher relationship nor a literal slave contract - unlike the other girls in his party.
So tell me: where's the "messed up" part?