It really was puzzling. In my imagining, I see Cersei having a backup plan to save her life and that of her unborn child. Once she saw the tide turn against her, she would immediately have left that balcony and proceeded into a secret passage underground that lead to somewhere safer. She could still encounter Jaime in the same place, they could still be trapped and die together, but, at least, Cersei would have died asserting some self-preservatory agency. Have them see each other, but not be able to get to each other due to rubble, and she has to watch him crushed under falling rubble. Then, she could die alone, weeping, as the building collapsed around her.