After spending most of her adult life nursing first her dying uncle, and then her invalid brother Walter, Margaret Mackenzie inherits a significant fortune from Walter at his death. Seeking a place in society, Miss Mackenzie moves to a town called Littlebath, (modeled after Bath, Somerset), and joins a group of Evangelicals centered around the popular local pastor Mr. Stumfold and his wife. At Littlebath she meets three men who are interested in marrying her. One is Samuel Rubb, the business partner of her surviving brother, Tom Mackenzie; another is Mr. Maguire, Mr. Stumfold's curate; and the third is her cousin, Mr. John Ball.
She is soon asked by Mr. Rubb to loan him and her brother 2,500 pounds for business purposes, a deal that turns out badly. Mr. Rubb admits that he has cheated Miss Mackenzie, but his honesty in telling her the truth about his actions allows him to remain a friend and prospective husband. She is invited for a short stay with the Ball family, and while there refuses a marriage proposal from Mr. John Ball. Mr. Maguire asks Miss Mackenzie to marry him when she returns to Littlebath, but she is forced to put him off after finding out that her brother Tom is dying and that she must go to him in London. While in London she refuses Mr. Maguire by letter.
After Tom's death, Miss Mackenzie finds out that there is a problem with her brother Walter's will, and that Mr. John Ball may be the rightful inheritor of the money. He asks her to marry him again while the legal issues are being dealt with by their respective lawyers, and she accepts him. Mr. Maguire interferes with Mr. John Ball, libeling him in an Evangelical newspaper, and visiting London to try to get Miss Mackenzie to marry him instead. The courts eventually decide in favor of Mr. John Ball, who soon becomes Sir John Ball after his father's death. Over objections from his mother, Lady Ball, Sir John and Miss Mackenzie are married and Mr. Maguire is forced to give up his own attempts. Mr. Rubb marries a lodger in Tom Mackenzie's old house, Miss Corza, and Mr. Maguire finds a wife and a new position.

Question: Why did Miss Mackenzie have to give her inheritance to John Ball?
Answer: The courts determined that there was an error in Walter's will, and that the money was rightfully John's
Alternative answer: he is the rightful inheritor