Whenever something unexpected comes her way, Cersei almost always manages to twist the current situation to play in her favor.
Most of the time, she accomplishes this through alliances that only hold strong until the allied few are no longer of any use.
There are many ways to describe Cersei Lannister, but none are more accurate than “survivor.”
In the span of months, she went from being publicly humiliated and naked in the streets to an all-powerful queen with all of her enemies dead, so should anyone really want to challenge her?