To analyze the literary context that would propel Pamela to marry the predatory Mr. B, consider how other novels from this time period—the 1700s—normalized the notion that lecherous men were an inevitable part of women’s lives. Crass advances and unwanted propositions were portrayed as ordinary elements of a woman's existence. Besides Pamela, eighteenth-century novels like The Mysteries of Udolpho and The Female Quixote reinforced the idea that the primary literary condition for a leading heroine was distress and suffering.
The literary context is not separate from the social context. Part of the reason why Pamela is expected to put up with Mr. B’s repeated sexual assault attempts is because she is a woman. During the eighteenth century, as with previous centuries and forthcoming centuries, women were thought of as inferior. They were not equal to men and were not granted as much agency and power as men. If a man thought he had a right to have sex with a woman, it was hard to dislodge him of that terrible, sexist presumption.
An analysis of Pamela’s character will probably uncover elements of sexism as well. It should strike one as problematic that Pamela’s virtue is connected to her endurance of Mr. B’s assaults and then her eventual surrender to Mr. B’s marriage proposal. Yet the coupling of goodness and passivity goes back to the literary context and the ways in which female characters were “rewarded” for their submissive behavior.