The meeting occurred at a dinner attended by all the G20 leaders. Trump approached Putin at this dinner and proceeded to have a one-on-one conversation with him.
It's not even a matter of whether they thought they could keep it a secret or not. Their initial reaction to everything is to lie. Is to fabricate. Is to be dishonest to the citizenry that it has been elected to serve.
It's habitual. They'll continue to lie at every opportunity, get caught, say "my bad" or "fake news" and then immediately lie about the next thing. Whether it's consequential or not. Whether they think for a second that they'll get away with it or not. None of that matters. All that matters is that the truth is an enemy that must be thwarted at every opportunity.