Ignoring the "stealing" vs. "infringement" red herring, you're still misrepresenting patents.
The motivation behind patents was to get inventors to reveal their inventions. Prior to patent law, inventors just kept everything a secret. This meant that inventions would get lost and had to be rediscovered later on. So in exchange for revealing their "secret sauce" to the state, inventors get a temporary monopoly on their invention.
As for the idea that you could never, ever tell whether somebody invented the same thing independently from another, I don't understand why you'd think so. In the extreme case, if it's the 16th century and two people living on different continents invent the same thing days apart, you can be pretty darn sure that neither copied the other. Information didn't travel that fast. But this doesn't matter in patent law, because its purpose it not to prevent the "stealing" of inventions. Its purpose is to encourage disclosure by awarding a temporary monopoly on an invention.
This is in contrast to copyright, where it is a valid defense to say you created your work independently.
After researching this briefly, it seems that the earliest "patents" in England weren't awarded to systematically encourage anything in particular, but were merely monopoly grants given by the monarch for whatever reason (e.g. as reward for X, I'll give you a monopoly on Y for 20 years). The French apparently developed a system that treated inventions as property.
Regardless of the historical motivation for patents, the reason for the inclusion of patents and copyrights into the US constitution and law was clearly to encourage new invention, not just to get inventors to disclose what they would have invented anyway. The US constitution was crafted in the middle of the industrial revolution, as we moved away from master craftsmen to big industry where it's hard to keep secrets.
As for the idea that you could never, ever tell whether somebody invented the same thing independently from another
Of course you might occasionally be able to prove convincingly that you came to an invention independently, but in general you can't. What's your point? Why do you think the US adopted a first to invent rule rather than a first to file rule? If the goal is just to encourage disclosure, then we'd have the latter right? First one to tell us how it's done wins! But that's not the rule we have, and the reason is that primary purpose of patents is to encourage new invention.
The motivation behind patents was to get inventors to reveal their inventions. Prior to patent law, inventors just kept everything a secret. This meant that inventions would get lost and had to be rediscovered later on. So in exchange for revealing their "secret sauce" to the state, inventors get a temporary monopoly on their invention.
As for the idea that you could never, ever tell whether somebody invented the same thing independently from another, I don't understand why you'd think so. In the extreme case, if it's the 16th century and two people living on different continents invent the same thing days apart, you can be pretty darn sure that neither copied the other. Information didn't travel that fast. But this doesn't matter in patent law, because its purpose it not to prevent the "stealing" of inventions. Its purpose is to encourage disclosure by awarding a temporary monopoly on an invention.
This is in contrast to copyright, where it is a valid defense to say you created your work independently.