A common misconception views patents as some sort of reward for novel discovery.
In fact, patents exist to facilitate public disclosure so that when an inventor dies his idea lives on.
Patents began in the Elizabethan-era in England. Guilds – whose livelihood depended on confidentiality and proprietary information – were secretive. Very secretive.
Medieval tanning practices, for example, were particularly heinous, relying largely on the use of animal brains and excrement to cure the skins. This meant that urban centers in the medieval world reeked.
Any guild that found a new way to tan leather absent the malodorousness common in the art would clearly benefit everyone. But most guilds wouldn't share their discoveries, lest they lose a competitive edge.
Enter Queen Elizabeth I.
The Queen offered to preempt others from practicing discoveries if the discoverer would first tell her how the invention was practiced. Her purpose was to benefit society as a whole, but at the same time she wanted to incentivize public disclosure of inventions while protecting the inventor's proprietary rights to make it worth their while. After all, the full protection of the Crown was probably more surety than secrecy – venal fellows of the craft might leak information, competitors might infiltrate or reverse engineer, or other forms of corporate espionage might prevail. Whereas a Royal writ engendering a monopoly within the realm was attractive; the Monarch (and her military and officers of state) would enforce the monopoly regardless.
This allowed for licensing fees to be collected. And everyone benefited from the improved conditions.
Consider that the word "patent" literally means "manifest", because to "patent" something was to disclose it completely (make it manifest, or made known).
Patent law grew over time from the common law, and was enshrined in the Constitution of the United States (Article 1 §8, ¶8). It remains a vital component in industrial and post-industrial societies, fostering innovation so that society as a whole will accrue knowledge and extend utility for generations to come.
If you have an idea, patent it. Protect it from unscrupulous men and other inventors. But also, enable society to benefit from it.