Warning! Spoilers ahead for Young Sheldon season 5.

Mary's (Zoe Perry) potential cheating scandal in Young Sheldon has been actually explained in The Big Bang Theory. All along there has been an expectation that Sheldon's (Iain Armitage) father will eventually commit adultery in the ongoing CBS comedy. But instead of developing that arc, Young Sheldon is setting up Mary's own affair with Youth Pastor Rob (Dan Byrd) instead.

Introduced as a youth pastor at Mary's church, Rob is among Young Sheldon season 5's new characters. After a brief, but tension-filled conversation regarding how to handle the kids' increasing interest in romantic and sexual relationships during Sunday School, Mary develops a crush on him. Eventually, Sheldon's mother even started to dream of actually sleeping with her younger colleague. Since then, Rob sporadically appeared in The Big Bang Theory prequel. But over time, it appears as if he and Mary have gotten continuously close. At one point, George even caught Mary and Rob smoking and having a great time, causing the Cooper patriarch to be jealous.

Related: Young Sheldon’s Big Bang Theory Title Connection Is Becoming A Lie

After not appearing for several episodes, Rob returns to the CBS family drama in the episode "Uncle Sheldon and a Hormonal Firecracker,” when Mary confesses to him about Georgie's (Montana Jordan) Young Sheldon situation. The pair continues to communicate, with the sitcom heavily implying that they will eventually start an affair. This may sound surprising considering Mary's uptight personality, but The Big Bang Theory had previously debunked that notion. In the outing "The Mommy Observation," Sheldon (Jim Parsons) accidentally caught Mary having sex with her boyfriend Ron. He confronted her about it, with Sheldon calling Mary a hypocrite after preaching about what's in the bible all these years. Mary was unable to rebut her son's accusations, proving that despite presenting herself as a devout Christian, she wasn't immune to committing sins that she preached against.

Mary in a dream sequence wearing lingerie and looking at Pastor Rob from Young Sheldon

For what it's worth, it has been clear for a while now that despite her claims, Mary isn't exactly the faithful Christian she likes to present herself as. Sheldon's mother has a penchant for preaching what's in the bible but regularly breaks those tenets when she thinks no one is watching. Mary is self-centered in Young Sheldon — like Sheldon was in The Big Bang Theory. She lies regularly and gives herself a pass because she thinks she's justified. She's been smoking cigarettes behind people's backs; she likes watching hard-core action films like Roadhouse, and yet she judges everyone who does the same. George and Mary were forced to get married after they accidentally got pregnant like Georgie and Mandy are now. So, while George has long been poised to be the problematic one in their relationship thanks to Sheldon's The Big Bang Theory stories about his dad, it shouldn't be all that surprising that Mary is capable of cheating as well.

Whether or not Mary and Rob start an affair in Young Sheldon is currently unknown. But their relationship is already slowly contributing to the breakdown of her marriage. George still hasn't confronted her about catching them smoking together — something that will expectedly factor in The Big Bang Theory prequel's upcoming storytelling as it revisits the Coopers' marital issues.

More: Young Sheldon Reveals Missy’s Worst Trait Came From Mary

Young Sheldon season 5 airs Thursdays on CBS.