A patent system does have drawbacks, there's no doubt. They're monopolies, so a firm which has a strong patent doesn't feel the same degree of competitive pressure that drives efficiency and benefits the consumer. Again, depending on their strength, they can stifle research and development by other competitors. This is nothing new; Watt's patents for steam engines are considered to have stopped anyone else bothering to develop their own steam power for the life of his main patents. As a large piece of software may rely on so many smaller elements, avoiding a thicket of patents can be difficult.
But by providing a reward, a clear shot at the market without competitors, it gives an incentive to come up with and develop products. If as soon as you had developed and released your product, competitors copy you and compete, you might be less inclined to create innovations. It's hard to see how the pharmaceutical industry could function, short of nationalisation or public subsidy, without the patent system. Development costs are high, and copying easy.
You've got to balance these pros and cons to decide whether patents benefit society (and I think there is the fairness to an individual inventor to consider, as well).
If you're a lone inventor with a good idea, how are you going to capitalise on this, without the possibility of a patent? As soon as the idea is published, every other Tom Dick and Apple can make their own version and outcompete you. You might get work out of it, since to start with you're a bit of an expert on it, and some bragging rights, but probably not the big bucks. The same problem exists, though not as acutely, for smaller firms. If you're short on resources, others can benefit as much as you from your idea. Copyright isn't really helpful, since you can usually sidestep copyright by extracting the idea and re-execute it.
Whether there's a need for it, whether the pros outweigh the cons, to be honest, I don't know, and I'm not sure anyone else does. For a long time, it was thought that software was unpatentable before the EPO, whilst the US was more generous. Gradually, the EPO - how shall I put this - came to understand that their legislation actually allowing a lot of software to be patented. I don't think there's any empirical evidence that Europe's software industry benefited from the absence of patents in the 1970s, or frankly, that it's benefited much from the increasing availability of patents.