The importance of the patent is primarily to protect innovative products and processes from undesirable imitation. The applicant receives temporary and spatially limited use and an exclusive monopoly position in the market.
Also the spread of the invention by publication without prior patent application is an option. This prevents anyone can get a patent for this invention, as it is no longer "new" after publishing. So everyone can implement the invention and use it for industrial purposes.
When deciding whether an idea should be patented or published, a decision matrix can help. An example can be found here.