In the case of software, a patent doesn't promote innovation, it hampers it. Allowing a company to sit on it's laurels for 20 years because they patented something as simple as swiping left to right to unlock a screen is absurd.
This isn't to say that companies shouldn't be able to protect their products. Trademarks are very valuable and help prevent cheap knockoffs, but patents aren't being used to protect their products against knock-offs. They are being used to force other companies to find complicated workarounds for a simple problem.