He was a bastard son of the lord, born between the lord and a captive princess who's basically there to birth sacrificial child (except one who'll get to be king of the country outside the barrier)
He was to be one such sacrifice, but was saved, apparently by a Goddess's will.
Anyway, most of the family didn't like him, and so after leading the territory's school team to its height in years and graduating a legend, he retired from society to be a priest.
The grandmother sent the Temple Head, her brother, to the temple to partly harass him and partly to keep an eye on him.
After seeing how Myne's parents protected her, even at the threat of death, he became...envious...of their familial love.
And through interacting with Myne, he found her to be a very smart student who can keep up with any advanced topics he throw at her (she doesn't know it's advanced)
He'll confess to her that he want to be part of her family, although to convince her he basically make it almost like a trade (blame Myne for that really, she has 0 ability at romance)
He'll help her govern the territory she just usurped to save him, to turn it into her dreamed library city (obviously named Alexandria)
In turn, he want her to give him some labs for his researches.