> It is a balance, though. If you patent something too specific, e.g. irrelevant implementation details, your patent is worthless because anyone could just change the irrelevant parts.
Chemical companies love this -- just look at the refrigerant racket. Or the medicine racket. Both will wait until their current patent expires, then have a new slightly-modified one granted, and get the old product regulated out of existence. The end result is that they keep a monopoly for effectively life, even though expiring patents are supposed to eventually create an open market.
This works best in industries where chemicals need to be tested and approved before they can be used. Otherwise, one would be able to simply change irrelevant implementation details.