In the novel, Laura Esquivel contrasts John Brown with Pedro in order to illustrate Tita's inner conflict. This is a classic "man versus self" conflict, where the protagonist must decide on the path she will take.
When the story begins, Tita is a dutiful daughter who must subjugate every independent impulse to her mother's whims. Mama Elena is imperious, mercurial, and vindictive; she expects Tita to remain unmarried so that someone will care for her in her old age. For her part, Tita is in love with Pedro, but Mama Elena gives her consent for Pedro to marry Rosaura (Tita's older sister).
As for Pedro, his only reason for marrying Rosaura is to be near Tita. The marriage is one of convenience, and even Rosaura knows it. Thrown together by fate, the two lovers are reduced to enjoying brief, stealthy interactions that are fraught with sexual tension. Unable to consummate their love for each other under Mama Elena's watchful eye, Tita must make a choice. Will she rebel against her mother's edict about marriage, or will she conform to Mama Elena's maternal expectations?
Tita tries to resolve her inner conflict by first considering John Brown's suit. Although John doesn't excite her sexually the way Pedro does, he still represents a means of rebelling against Mama Elena's expectations. John Brown is also the one who nurses Tita back to health after her nervous breakdown. In the story, Tita manages to suckle Roberto (Pedro and Rosaura's baby) even though she is not his mother. Incensed at this, Mama Elena sends Rosaura's little family away, and Roberto dies soon after.
Following Roberto's death, Tita experiences an emotional crisis that leads to John Brown taking her into his home. He nurses Tita back to health tenderly and unselfishly. As a savior of sorts, John Brown represents renewal, hope, and purity. He isn't someone else's husband, and Tita can marry him openly without incurring the wrath of her orthodox society. On the other hand, Pedro represents tempestuous passion and sexual ecstasy. Tita must decide whether she will make the "safe" choice of marrying John or consign herself to eternal disgrace in the eyes of her community.
In the end, Pedro makes the choice for Tita. After spying at her in the shower, his lust becomes so inflamed that he is moved to release his pent-up sexual tension. On that very night, Tita both loses her virginity and becomes pregnant with Pedro's child. The choice is clear: Tita chooses Pedro; later, they die within minutes of each other after sharing a tumultuous sexual experience on the night of Alex and Esperanza's wedding. So Laura Esquivel contrasts the characters of Pedro and John Smith to represent two opposites: conformity versus personal agency. In choosing Pedro, Tita exhibits both fierce independence and courage.