In TROTW prior art needs to predate either the filing date or, in some cases!, the publication date!
I gather the new law didn't alter the prior date in the US, so their new patent system now combines the worst bits of prior art from their legislation and elsewhere.
"First to file" is far better than first to invent. It gets rid of a lot of argument and fraud about when something was invented. And in most instances I believe trade secrets are protected - if somebody else comes along and patents what I've been doing for years, they can't sue me. But if I didn't publish they do have a valid patent and can sue anyone else.
The whole point about "first to file" is not that the first person gets a patent. It's that if there is NO PRIOR ART then it assumes that the person who gets his application in first is the true inventor. Any previous publication (including by the applicant!) is classed as prior art and will block the patent.