My Theory: Jamie is disgusted with Cersei after her armies reject him as Commander.
His last option is to defect and attempt to change sides. He learns Dany has now assimilated the North into her army and they are at Winterfell preparing for the NK. He sends a message to Tyrion, who persuades Dany and Jon to Grant him an audience there.
He 1st pleads for forgiveness , for killing her father and for attempting to kill her. Dany's men all have weapons drawn and are at the ready in case she gives the order to kill him.
Dany is about to give the order until Jon and Tyrion convince her the great war takes precedence over vengeance.
Instead she orders his other hand removed as his punishment . Before it can be done , Tyrion begs for mercy on his behalf, and Jamie finally reveals that Cersei lied about helping them in the Great War, and he came not only to bend the knee but to change sides and fight for her now just as his brother did.
Dany reluctantly accepts and orders Jamie back to King's Landing to kill Cersei or die.
What do you guys think? I know it would insane for Jamie to go into enemy territory alone but crazier things have happened on this show.