a patent is a legal restriction affecting what others are allowed to produce. a person/group hit by such a restriction may elect to not produce the (innovative) thing they otherwise would have.
so that's the viewpoint in which patents may be "the antithesis to innovation". i won't argue which one's correct, just providing it here since you requested.
Patents also require disclosure of how something is done, and the history of innovation in the Western world has been one of iterative improvements on patented inventions so as to be granted a new patent.
Software arguably is not suited for a patent system, but patents have worked well for centuries.
So... yeah a patent restricts what others can produce. But parents are supposed to be for things that are novel, which means if it's unlikely for someone else to produce it to begin with. Parents are supposed to help encourage people to innovate. I do think to many patents are given and many aren't novel enough. But I do believe, at least historically, they led to innovations.
I also don't think software works be patentable