Patents are intended to be a limited monopoly designed to encourage innovation. If you build a faster steam engine then you get to profit from this advancement for some time.
There is a distinction in software requirements between the Problem Space (PS) and the Solution Space (SS). The PS is a set of definitions of the problem, for example I want to get past a wall. The SS is a set of solutions to the problem, for example a rope ladder, a tunnel, a sledgehammer.
Software requirements should only deal with the Solution Space (that is specify the problem not how it is to be solved).
There can be many possible solutions to a given problem space. Patents are typically acceptable if they can cover a single solution since it is possible to find another solution.
The problem with software patents is that they are typically expressed in terms of the PS rather than the SS. This means that it is not possible to work around the patent if you want to solve the particular problem.