The patent system as it currently exists has some serious flaws. While patents are useful in many industries, patents and software are an uncomfortable mix. You can read about some of the problems with patents and software in the articles linked below:
Patent Basics