There was a real possibility that the scene at the dragon pit that opened "The Dragon and The Wolf" could have devolved into yet another violent trap like what we saw in Season 6's finale "The Winds of Winter." In that episode, Cersei brutally eliminated her enemies by trapping them in the Great Sept and burning them alive with great green plumes of wildfire. David Benioff and D.B. Weiss were clearly wary of repeating themselves with this finale, so they devised a method of betrayal for Cersei that was less explosive but more intimate. This time she didn't take out a rival family. She instead turned her back on her own brother.
When Cersei and Jamie have their showdown, it came right on the heels of the similarly charged exchange between her and Tyrion, who was put in the unfortunate position of having to negotiate with his his sister. Both scenes showed the Queen at the peak of her manipulative powers, using her unborn child as a way to toy with Tyrion and Jaime's expectations. Like her father Tywin Lannister, she's become a master at telling different parties just enough information to get them to follow her orders.
Only it doesn't work on Jaime, who appears genuinely terrified of the wight and of Dany's powerful dragons. "Our child will never be born if the Dead come South," he tells Cersei when she suggests that they should simply let the armies in the North fight the White Walkers and deplenish their resources. He thinks she's being naive and failing to see the big picture. She thinks he's failing to imagine the true scope of her power. Again, this scene really let the show do what it's always been best at: Letting two skilled actors face off in a one-on-one conversation about the ethics of their actions. Throughout the scene, you could see the rippling currents of pain in Jamie's face.
But the thing that perhaps most wounded Jamie was that he wasn't let in on Cersei's plan with Euron Greyjoy and the Iron Bank. "It's one thing to say Cersei played a trick on her enemies, but she didn't confide in him," said David Benioff in the show's behind the scenes segment. "He's realizing that his loyalty to her is not reflected in her loyalty to him. I think that's absolutely what informs his decision to leave King's Landing."