With a patent, others must get your authorization when using the same technology. So you can charge a certain royalty.
Patents are mainly produced to protect the inventor's invention achievements. Will not be used by others for free. Thereby encouraging invention.