To get a patent, technical information about the invention must be disclosed to the public in a patent application. The historical purpose of the patent system was to encourage the development of new inventions, and in particular to encourage the disclosure of those new inventions.
Inventors are often hesitant to reveal the details of their invention, for fear that someone else might copy it.