She didn't marry for solidifying her grip to the throne. Infact, Cleopatra originally ruled jointly with her father Ptolemy XII Auletes, and later with her brothers Ptolemy XIII and Ptolemy XIV, whom she married as per Egyptian custom, but eventually she became sole ruler.
As pharaoh,
she consummated a liaison with Julius Caesar that solidified her grip on the throne.
She later elevated Caesarion, her son with Caesar, to co-ruler in name.