Mari was unsatisfied with her life, and had her misgivings about her mother, and the fact that she had her name changed. Her birth name was Fumiko, not Mari, but it seemed like her paternal grandmother had chosen the name, and her mother hated it. When her mother-in-law died she changed her daughter's name from Fumiko to Mari. It seems like this was traumatic to her, to say the least. To a point where this episode became a repressed memory. Her relationship with her mother also seemed to be somewhat bad. The constant absence of her father from the house may also have something to do with his relationship with his wife. The root of the problem itself is unclear, though the whole story of Mari's name may have made it worse. In this context Mari ran into Komori (Isao), and envied him for what she perceived as him being free from the pressures and expectations of society. She watched him and fantasized about his life and circumstances. She obsessed about him to such an extent that she convinced herself that she was, in fact, him. It is unclear whether Isao Komori really knew her or watched her like portrayed at the beginning of the story. That may have been Mari's own idea or notion about him. The whole episode sort of resolves itself as she remembers what happened to her in the past, and works out her experiences.
The main theme of the story, as I see it, is identity. Good ol' "Know thyself", with a twist here and there. A bit of romance sprinkles, emphasis on "sprinkles".