Ian knows that Louise can see the future due to having learned the Heptapod language. (If not at first then surely by the time she publishes her book on the subject.) Therefore:
When Hannah is eventually diagnosed and then dies as a result of this rare disease, Ian would be able to deduce that Louise knew it would happen and didn't tell him. He most likely would have divorced her at this point anyway.
Knowing that he could figure this out by himself, she decided to tell him beforehand. One way or another, the result would have been the same.
Also, learning the Heptapod language and gaining the ability to perceive time in this way apparently brings with it a compulsion to steward in the future rather than trying to change it. Perhaps a better understanding of Time changes your opinion of the idea of changing it. The Heptapods surely could avoid their crisis by themselves with a 3000 year head start - if nothing else they could simply evacuate the affected planet(s) long before disaster strikes. Instead, they contact humanity to ask for our help. Likewise:
Louise could simply not have a child with Ian. Or she could make a point of being abstinent for a few months around Hannah's conception date in order to ensure a different ovum - and therefore a different child - who would (hopefully) not have the same rare disease. (If she knows Hannah's birth date via "future memory" she can calculate the approximate time of conception.) But instead, Louise decides to go ahead and have the child she foresaw having, despite the tragic circumstances that go with it, and the inevitable divorce with Ian.