Like, for instance, incest.
But, incest isn't the only such secret such tests can expose. For instance, many people have discovered from genetic testing that, thanks to parental infidelity, their siblings are really only half-siblings.
While birth control and the availability of abortion might reduce the incidence of such family secrets today, they had to be extremely common prior to the 1960's. I don't know how common, but I'm guessing as many as one in ten, certainly as high as one in 20, births resulted from undisclosed marital infidelity in the days before birth control and abortion.
For this reason, I've always been skeptical of tracing one's family tree back more than just a generation or two, if that far. With each generation, especially those born prior to the 1960's, the odds that your family line became corrupted with genetic material from an "outsider" increase exponentially. Family trees are a fascinating way of tracing one's cultural heritage, but I'm guessing that they are far less accurate than most suspect in tracing one's genetic heritage.
Given the emphasis on "royal blood" in European aristocracy, I think it would be fascinating for scientists to perform genetic tests on several royal families and their supposed "blood" ancestors. I suspect that we wouldn't have to go back more than just a few generations before we discovered that any impostor had gained the throne, or perhaps some lessor title of nobility.