The New York Times has an entertaining story today describing how a precedent is born. In this case, other courts seized on attractive legal reasoning even though the entire opinion turned out to be based on facts that had not taken the trouble to exist. See Legal Precedent Doesn't Let Facts Stand in the Way for the details.
I suppose it helps to be a lawyer to understand why this isn't nearly as weird as it sounds. Judging from the article, the original opinion was one that guided the parties — evidence is admissible if the following conditions exist. Yes, the judge wrote the opinion thinking those conditions existed…but when they turned out not to exist, the opinion was still valid as it explained why the evidence was not admissible after all. So it wasn't dicta. And if in fact other courts found the reasoning persuasive, so much the better for them. (Whether in fact the opinion is correct is, however, a whole different question….)