In "The Queen's Justice," Euron Greyjoy delivered his captives to Cersei Lannister: Ellaria Sand and her daughter Tyene. Ellaria was responsible for the death of Cersei's daughter Myrcella, making her an immediate target of Cersei's vengeance. But Cersei didn't kill Ellaria. Instead, she took her anger out on Tyene. But why did Cersei kill Tyene on Game of Thrones?
Cersei's motives were simple: she wanted to do Ellaria what Ellaria had done to her. And Cersei took that idea seriously, recreating the murder of Myrcella down to the last detail. Since Ellaria took Cersei's only daughter from her, Cersei decided to return the favor by killing Tyene, Ellaria's only living child. But her revenge plan was slightly more complex.
After chaining Ellaria and Tyene to the opposite sides of the same cell, Cersei kissed Tyene – and by doing so, she poisoned Tyene, just as Myrcella had been poisoned by Ellaria. Cersei even used the same poison. Then she left Tyene to die a slow and painful death in front of Ellaria's eyes. She took it a step further, too: every measure would be taken to keep Ellaria alive for as long as possible so she could watch her daughter decompose.
Cersei's revenge against Ellaria followed the old "an eye for an eye" adage, though she had to give it a little extra flourish of cruelty because that's Cersei's speciality. Myrcella's murder was horrifying, but at least Cersei hadn't been forced to witness it himself; it was sadistic to make Ellaria watch every single detail of Tyene's death and decomposition. Then again, Jaime had seen Myrcella's slow death, so perhaps details of Cersei's revenge were inspired by what Jaime had gone through.
Leaving Ellaria alive does open up the possibility of her future rescue one day, provided Cersei's kingdom does eventually fall to Daenerys. Ellaria was one of Dany's allies, so Dany could always seek to rescue Ellaria from prison should she find out what happened. But that feels unlikely at the current moment. As far as Dany knows, all of her Dornish allies are dead and she has no plans to attack King's Landing any time soon. There doesn't seem to be much hope for Ellaria.
In nearly one fell swoop, Game of Thrones has wiped Dorne almost entirely off the map – and by taking out another one of Dany's allies, it has ensured Cersei's hold on the throne for a little while longer.