Prior art that was public knowledge before the filing is still supposed to invalidate a patent on the same thing. First-to-file means if person A was first to invent but kept their prior art secret (no publishing or filing), and then person B filed, person A's secret prior art can't invalidate B's patent.