Because Cersei never gave the order
The order we see on screen is Cersei telling the Mountain to draw his sword. The kill order never comes. This is confirmed in the official script.
JAIME: Give the order, then.
He watches her and waits.
The Mountain waits for a command from his queen.
She nods. The smallest possible nod.
The Mountain draws his sword.
Jaime knows there’s no point fighting. He knows he will be cut in half.
He stares at his sister for a long beat.
JAIME: (quiet) I don’t believe you.
After a long beat, Jaime turns and walks away, right past the Mountain and his drawn sword.
Cersei watches. She does not give the command.
Game of Thrones, Season 7 Episode 7, "The Dragon and the Wolf"
Older answer below regarding details before the official script was released.
Cersei was Bluffing...
...according to the leaked script:
[Jaime and Cersei]: "He walks out on her, while she is threatening to have The Mountain kill him. Jaime calls her bluff however, and the Mountain stands aside and lets him leave her chambers. Next we see him he's on his horse heading north. That's all we see of him."
So it appears it was more of an intimidation to try and get Jaime to submit to her further but as we know that didn't exactly work out quite right.
I will also quote this answer from SciFi as that explains the actors thought process from the scene:
Jaime had an inkling that Cersei wouldn't actually kill him
Our good mate Nikolaj Coster-Waldau (the actor who portrays Jaime) breaks this down for us nicely in a recent interview with Leigh Blickley on HuffingtonPost:
[Leigh] Not going to lie, I thought this might have been your demise. The Mountain was ready to kill you! But you called her bluff.
[Nikolaj] Cersei had the chance with both her brothers to kill them and she was threatening to do so, but both times she eased off on the trigger. I get that with Tyrion she was setting him up for failure ― making him believe that he was the hero of the day, that he negotiated this amazing support from the Lannister army and what a wonderful thing he did. So that makes sense. For Jaime, I would think he would think there was part of her that still understands that he really is the last person that she has. That is the truth; that must resonate somewhere inside her. That would help. Or maybe the Mountain is just so thick that he didn’t get the eye signal. Maybe there’s a scene right after where she goes, “Why the fuck didn’t you kill him?! I gave you the signal!” I don’t know. Who knows. We’ll never know because that scene isn’t there, but that might be the case.
-HuffingtonPost, Nikolaj Coster-Waldau Breaks Down That Huge Jaime Moment On 'Game Of Thrones'.
The caveat is that this is the actor's own interpretation of the scene, but that goes to show that the writers haven't told Nikolaj the actual reason for this. That's not to say that one doesn't exist, however, this is all the insight we have at this moment.
If you watch the full scene The Mountain takes out his sword but then lets Jaime pass so that appears to back up the bluffing/intimidation interpretation:
Also as @Flater mentions in a comment Cersei probably already told The Mountain only to pretend and not actually kill him, though we don't know for sure:
As to why the Mountain did not act on Cersei's nod (which I, and assumedly most viewers took as the sole confirmation that was missing from Tyrion's earlier possible killing), the Mountain would likely have been made aware that by Cersei beforehand that she wanted him to pretend more than intend (at least as a first measure). She did a similar thing with Euron, agreeing on one thing but then (in the moment) pretending like it was spontaneous.