Because it was the obvious choice.
Even before the season finale started, I was expecting Cersei to pull this move. It's a really common trope for the villain of a plot to not honor a deal that he makes with the hero. If anything, it further cements them as the villain.
Which is basically what happened, when you consider Jaime's point of view, Cersei's betrayal of the truce is the straw that breaks the camel's back and shows Jaime that Cersei is beyond reasoning (or salvation, for that matter).
Cersei's threat of having the Mountain cut Jaime down of course further exacerbates Jaime's feelings towards Cersei, but it's important to note that she only used that threat when Jaime already decided to leave. Cersei's threat basically turned Jaime's temporary absence (fighting in the North, then returning to KL) into a permanent absence (which we'll see in season 8). Why would he go back to someone who just threatened to kill him? Even if he called her bluff, she might not be as reluctant a second time.
Cersei's decision isn't anything groundbreaking. She probably already considered it from the second she was made aware of a truce being on the table. In all honesty, Tyrion should be aware of this too, even if Danaerys and Jon are not. Tyrion knows his sister well enough, and Cersei's move seems very Tywinian.
The next season will shed some light on this, but I'll be disappointed if no one on Dany and Jon's side has considered it to at least be possible for Cersei to pull this move.
Euron actually somewhat proves this point. Even before the wight was shown, he already acted out of line.
- He called out Theon and came across as egocentric and focused on his personal vendetta (almost comically missing the point of the meeting).
- Cersei then told him to sit down or leave, thus "proving" to the participants that Euron and Cersei weren't closely allied.
Given that Cersei had told Euron to fetch the Golden Company, it stands to reason that Euron's behavior was not unexpected by Cersei. Cersei even has a very good reason to pretend like Euron is a dog without a leash, who then hightails it out of the meeting: it makes the other participants think that Cersei's position is suddenly and unexpectedly weakened.
Also note that while Cersei may not be convinced that the Walkers are real, she should correctly acknowledge that Danaerys and Jon's appearance in King's Landing means that they will have some form of believable evidence (believable enough for Euron to walk away like he did).
Euron's earlier misbehaving actually helps sell that point. If Dany and Jon had only brought circumstantial evidence (e.g. a dead wight), Euron could believably still hightail it out of there out of a sense of self preservation (showcasing his selfishness was the main result of him interrupting Tyrion to address Theon about something insignificant, relatively speaking).
Cersei is basically doing what Theon did in the fistfight later on. He put himself in the position of a weak contender, and gave his opponent a clear shot at a clear weak spot (his groin). The opponent was so confused by his cheap shot not working, that he overplays his hand (trying it again and again, almost forgetting about the fight and being distracted by Theon's seemingly uncrushable genitals) thus giving Theon the opening he needed to win.
Similarly, Cersei was hoping to make Danaerys think that she has a weak spot (no more Iron fleet), which makes her think that Cersei will either easily be outmatched, or more likely to accept peace over war. And in that portrayal of weakness, Cersei can sneak up on Danaerys with Euron and the Golden Company.