There are several plot points that have been deeply important throughout Game of Thrones. The Night King and his army needed to be defeated, for one thing. Viewers assume Cersei Lannister must be removed from King's Landing and the Iron Throne. But perhaps most importantly, the truth about Jon Snow's heritage needed to come out. In the premiere, he learned the truth. In Episode 2, Daenerys learned the truth. Now, it's time for the rest of the world to meet Aegon Targaryen. Jon Snow told the Starks the truth on Game of Thrones, and the result was better than he'd hoped. Warning: Spoilers for Game of Thrones Season 8 follow.
As much as Daenerys was probably hoping Jon would keep his mouth shut over Bran and Sam's claims of his parentage, that was never going to happen. Jon is truthful to a fault, a problem she discovered last season at the Dragon Pit. Moreover, letting Sansa and Arya believe he's their brother when he's not would never sit well with him. Especially since there's a whole "Lord of Winterfell" issue. Jon has already done everything to make sure Sansa is seen as the head of the household and the heir to Ned Stark's home. But letting her know he's a Targaryen would doubly set any doubts she might have to rest.
Daenerys recognized the danger. Sansa is not the girl Jon believes her to be. (Neither is Arya, for that matter. He still asked her if she'd ever used Needle.) Jon's stubborn inability to recognize the reality of the political situation before him strikes again. It may ruin the relationship between them forever, despite Jon's every attempt to side with Daenerys in public.
In the end, Jon Snow told them in the Godswood, which is the right place for it. He told them partly because they were pushing him to side with them against Daenerys, as the last of the Starks.
Though, actually, he did not tell him himself. He told Bran to tell them. So in a sense, he did what Daenerys wanted. He didn't tell them, Bran did.
But Daenerys was right. Jon made Sansa promise not to say anything, but it was only a day before she told Tyrion. And then it was a day before Tyrion told Varys. And before you know it, as Varys says, it's no longer a secret. It's information.
And it's a massive problem for Daenerys. He has the war hero status, he has the love of the people. And worst of all, he has the better claim. Tyrion may still be arguing for Daenerys to remain their chosen leader, and barring that, have her marry Jon Snow to solidify any problems that might arise with him as a claimant. But Varys is right. Jon won't do it, and the North won't accept it even if he did.
Varys can see perfectly well what must be done, even if Tyrion can't. The smell of betrayal is in the air, just as Daenerys always feared it would be with Varys.