The patent system is too broken. Anyone who writes software should hate patents. Anything you write will infringe on some patent out there. If all you want is money then writing software isn't the best way to go about getting it.
A better system would be one where patents do not give protection to ideas, but do give minor tax incentives to the people who own and use a related patent in their business. Then their ideas are shared, but not using the patents gives them nothing, and they cannot block others from using the all too often obvious ideas.
I write software (open source on GitHub) and don't hate patents. I hate bad patents, the kind you can infringe upon just by writing software, but lots of patents aren't bad patents. E.g. IBM has a number of patents on compiler optimizations. Am I going to stumble upon Steensgard's pointer analysis by accident? No, the only reason I know about it is that IBM let him publish a paper based on the research they paid him to do at Watson.
Yes! Yes, you could stumble on Steensgard's algorithm. Like convergent evolution in nature, it's easy for requirements to shape implementation, and for multiple implementations to naturally overlap. There are so many software patents out there- it is a minefield.
Additionally, engineers at large companies are discouraged from doing their own patent research, because of the risk of losing a "sorry, we created this organically in good faith" defense in litigation.
Publication of patents does not offset the chilling effect and legal overhead on our industry.
A (neo-)liberalist would not approve the difference, as long as money is made, but the patent system is government regulation of trade, so he would not approve of the patent system itself if he took his conviction to the logical end.
Suppose X is sandwiches. If I'm allowed to charge anyone who makes sandwiches, yes, my patent is worth lots of money. It's not "worthless" in that sense. It's worthless in the societal sense: allowing my monopoly provides no value to society.
Nobody thinks you can't make money from software patents. Some people think software patents do not provide value to society by encouraging innovation, which is the stated legal intention of intellectual property law.
When people call patents valueless, they're probably talking with respect to society as a whole.