So far Game of Thrones has shown Varys and Tyrion to be somewhat good friends and people on a similar level of understanding in terms of what they want to accomplish. In the previous episode, Tyrion even revealed the truth about Jon Snow to him, instead of talking to Daenerys about it.
Now in S08E05, Tyrion just walks up to Daenerys and calmly lets her know that it is Varys who has been the one to betray her (presumably meaning spreading the truth about Jon via his letters).
Why would Tyrion betray his good friend like this, knowing he will be executed for it? Surely Daenerys would never be able to deduce who it was that spread the rumours: it could've been anybody that Sansa and Arya might've talked to, or maybe Sansa and Arya themselves, so there'd be no way for Daenerys to find out. Why did Tyrion then just give up Varys like that?