Prior art still invalidates a patent. First to file only comes up when you have to people inventing the same thing at similar times.
You can invent something without it being prior art if you don't publish how to do it, file a patent, or use/sell it in commerce.
So if you are testing a new invention in secret and then the University of Wisconsin files a patent on the same thing, they get the patent. If someone else had already sold the products or described it publicly, nobody could get a patent on it (except for the person who sold it and then only for a year after they sold it).
You can invent something without it being prior art if you don't publish how to do it, file a patent, or use/sell it in commerce.
So if you are testing a new invention in secret and then the University of Wisconsin files a patent on the same thing, they get the patent. If someone else had already sold the products or described it publicly, nobody could get a patent on it (except for the person who sold it and then only for a year after they sold it).