Battle of the Bastards - S6-E9
Character mistake: When Theon and Yara are given an audience with Daenerys, Tyrion remarks to Theon that when they last saw each other at Winterfell, Theon was making jokes about Tyrion being a dwarf. The mockery was actually the other way around: Tyrion mocked Theon for being a glorified and subservient hostage of the Starks, as well as taking potshots at the foolish strategy of the Greyjoy rebellion.
Answer: Basically it's because he broke his vow. A member of the Kingsguard is sworn to protect the king at all costs. Jaime elaborates more on the deed to both Catelyn Stark and Brienne of Tarth, telling Catelyn that no matter what course of action he took, he would be breaking one vow or another (i.e. if he obeyed the king, he would conversely be disobeying his own father), and telling Brienne that the Mad King was planning on burning all of King's Landing, but he did not bother to tell Ned Stark that. Ned Stark felt that killing Aerys was dishonorable and excessive. Robert Baratheon still could have usurped the throne without Aerys being killed.
Phaneron ★