Suppose you have a good idea for an invention, but you don’t really care to make money with it. You may prefer instead to donate the invention to the public good. If so, you can perfect the invention and make voluntary public disclosures where and how you wish.
While you may suppose that there is no purpose to filing and pursuing a patent application for that invention, there may be circumstances in which you still wish to accomplish patent protection.
For example, you may believe your invention should be used by certain public sectors and enterprises but not necessarily by others. If you get a patent, you can enable those enterprises and sectors you favor to practice the invention, and prevent other enterprises and sectors from practicing it.
If you own the patent, you can distribute free and non-exclusive rights to practice to favored enterprises and groups, and deny practice to others.