An AC already covered this somewhat, but patents are meant to combat more than just others making money off of the patented invention.
Licensing is by far the most common route, but you can completely block the use of the invention by others for the duration of the patent if you so choose. Drug companies often choose this option, so you'll still have to wait a few more years for generic Viagra to hit the market.
Staying in the software realm, say you hold some software patent, and you actually make and sell a product using it. Now, Microsoft or Apple starts giving away a product that does essentially the same thing. The rights conferred to you by the patent still allow you to stop them from distributing the product, or force them to license the technology, despite the fact that they're not actually making any money off of it.