Daddy issues.
You've got Ayane, whose father neglects her and whose mother abandons her, and her best friend Ami, whose UNCLE dotes on her. Sensei is more of a father to Ami than Ayane's own father is to her, and he accepts Ayane into his household on the regular without asking for anything in return -- which to most kids isn't a big deal, it's a thing that most parents do for their kid's friends, but because Ayane has such a low expectation from parents in general, it feels to her like something above and beyond. She's also got the "rich girl" stigma, so she's possibly expecting people to be nice to her with a financial goal in mind, but Sensei's nice to her for years in her formative years, and never seems to expect anything for it.
She starts idealizing him, first as a proxy parent, then as a man. Infatuation sets in when the hormones start to show up in the pre-teen years, and by the time she's in high school that's grown into an unhealthy (and exploitable) obsession.