That's a good question. I'd like to think that she had a choice and wasn't locked in to determinism. The future IMO isn't immutable regardless of how she perceived events would transpire with Ian so she could've probably chosen not to go down that path but decided she wanted to even if it meant dealing with the pain. It makes sense though, to a degree, he'd leave her without having the benefit of being able to process the past, current and future concurrently like she'd been able to while knowing the implication of their relationship.
My memory is a bit fuzzy but IIRC that was in reference to her daughter. After Louise is capable of understanding the Heptapods' language and able to process time in a nonlinear fashion to see her future with Ian and Hannah, it's inferred that her telling Ian about their daughter eventually dying and knowing that it was going to happen all along due to the "gift" the Heptapods gave her is what strained their relationship to the point of him eventually leaving.
It's subtle but the hints are definitely there. This whole article should clear everything up if you're confused though.