Did past historians ever mistakenly take a piece of satire as historical primary source when it was in fact satire or purposely blown out of proportion? Kind of how we get people screwing up links to the Onion as legit news? And how do we verify the information in ancient sources so that we know these people actually existed?
We have satire, political humor, and other irreverent forms of literature from antiquity. We know what it looks like, we're quite familiar with it. Moreover, it's not as though such works are not without their use--Petronius tells us an enormous amount about the society of his time, in his own tongue-in-cheek sort of way, and he also provides useful information, e.g. his parody of the alba, the only known passage that uses that particular form, even if the actual information is absurd.
Texts don't just pop up out of the ground. They're part of an extensive literary discourse beginning from the contemporary conditions at the time they were written. They are referred to by contemporary and subsequent authors, discussed, commented on, used as sources, imitated, perhaps lost. It's not that hard to place a text in its proper context, or to identify the type of text that we're looking at. Moreover, for most of our texts we never stopped knowing who their authors were and for what purpose the text was written. These texts were copied over the course of centuries, and while sometimes they were lost and only preserved in a monastery somewhere it's not as though with most authors nobody knew who this person was--this is information that was transmitted over the centuries, and often written directly into the author's work, other authors' works, and commentaries