The amount of testing, regulatory costs, tooling costs, etc etc, makes bringing an innovative thing to market very, very expensive indeed. Most of these things are also trivially easy to reverse engineer - the patent is the only thing preventing a company's competitors from cloning the tech, avoiding all of the costs associated, and discouraging innovation overall.
The trick is software patents - software largely doesn't cost a lot, not compared to big heavy machinery requiring onerous certification and government authorizations. 3 guys hacking for a month straight is peanuts compared to, say, the amount of money it would cost to bring a new fuel injection system to market, yet the software these guys produce can be equally valuable from a marketability perspective. This is where patents fall apart - the point of the patent system is to encourage R&D spending by allowing protection of its results, because being simply first to market is not a large enough advantage in many industries to be profitable. It is, however, true in software, so I'm personally dubious of software patents in general.
Just some perspective - I dislike the "patents are evil, always, every way!" kneejerk reaction. It has a very valid role in a lot of industries that aren't well represented or understood by people on HN.