Because of the time in which the story is set, the social norms regarding women's roles in the house and society are greatly reduced compared to today. In the story, the female narrator is suffering from post-partum depression following childbirth, a natural and common condition, and is prescribed complete bed rest by a doctor.
John, the narrator's husband, believes in the competancy of the doctor, and so the narrator is forbidden to engage in any work or stimulating activity. Because she is not receving any other therapy, she focuses on the unusual wallpaper in the house for mental stimulation, creating a story to occupy her mind. John is oblivious to her needs and keeps her confined and unoccupied; he doesn't understand her need for stimulation and so adds to her slow mental decline with his indifference.
"...It is only three weeks more and then we will take a nice little trip of a few days while Jennie is getting the house ready. Really dear you are better!"
"Better in body perhaps--" I began, and stopped short, for he sat up straight and looked at me with such a stern, reproachful look that I could not say another word.
"My darling," said he, "I beg of you, for my sake and for our child's sake, as well as for your own, that you will never for one instant let that idea enter your mind! There is nothing so dangerous, so fascinating, to a temperament like yours. It is a false and foolish fancy. Can you not trust me as a physician when I tell you so?"
(The Yellow Wallpaper, Gilman, library.csi.cuny.edu)
He sees, perhaps, the first signs of instability in her mind, but he attributes it entirely to a woman's natural hysteria (a common assumption at the time) and refuses to attend to it as a condition. Instead, he continues his ill-advised "treatment," which is to say imprisonment, and in the end she succumbs to her madness.