Catherine ended up trapped in a love triangle with Heathcliff and Edgar. Even though she had feelings for the former, she married the latter. This situation affected her health. That is why she died when giving birth to her daughter.
Detailed answer:
Ever since Heathcliff appeared in Wuthering Heights, he and Catherine Earnshaw had a great relationship. The two of them spent a lot of time together and saw each other as good friends. However, when Hindley took over the manor, he began to prevent his sister from interacting with Heathcliff. Then, Catherine developed a friendship with Edgar and Isabella Linton from the Thrushcross Grange estate.
Soon Edgar begins to have feelings for Catherine, which frustrates Heathcliff. Being torn between her old companion and new friends, she tells Nelly Dean about her feelings for both men. As a matter of fact, Heathcliff managed to overhear their conversation. He felt upset and decided to leave Wuthering Heights. After that, Heathcliff was not seen in the manor for years.
In the meantime, Catherine reciprocates Edgar’s feelings. The couple soon marries. Following the wedding, she moves to Thrushcross Grange to be with her husband. The latter suspects that Catherine has a very fragile psyche, so the young lady is indulged in all ways. However, her doubts are shown in the book. She believes in her deep connection with Heathcliff.
The latter reappears at the front door of Thrushcross Grange three years after his departure. To everyone’s surprise, a sloppy boy has turned into a stately and wealthy man. Heathcliff’s return serves a fuel for Catherine’s doubts. Edgar Linton is unhappy about that, as he has been protecting his wife from all shocks for several years. Nevertheless, he could not resist his lady’s wish, so Heathcliff’s visits lasted for a while. At some point, he begins to carry out his revenge by seducing Isabella Linton.
Edgar learns about Heathcliff’s plans and bans the man from Thrushcross Grange. Catherine is once again devastated, as she can no longer see her old friend. Her mental state becomes worse, just as Edgar feared upon Heathcliff’s return. Sometime after, Catherine refuses to eat anything or go out of her room. Her delusions get more serious. It is soon revealed that the woman is pregnant, which only makes Edgar more concerned. Catherine’s delirium ensues and persists to the end of her life.
As time goes by, she shares a few more meetings with Heathcliff. However, it only during their last time together that they speak about their feelings. Catherine claims that she is dying because of Heathcliff. He is devastated by seeing the love of his life in such a condition. The meeting is interrupted by Edgar Linton’s return, which shocks Catherine to the point of insanity. She gives birth to a seven-month girl, later named Cathy, and dies a couple of hours later. Catherine’s funeral marks the point of absolute decline for Hindley, who soon dies of alcoholism. Although Catherine Earshow dies around the halfway point of Wuthering Heights, her presence persists throughout Emily Brontë’s novel. Heathcliff mourns her until he suddenly dies, and everyone believes that their souls finally reunite.