Copyrights don't last forever -- they just last for a much longer period of time. In fact, the United States Constitution (Art. I Sec. 8 cl.

prohibits them from lasting forever.
Patents only last 20 years from filing because it is strong IP right. Unlike copyright, independent creation is not a defense to patent infringement. A patent prevents anyone other than the patent holder (or their licensees) from practicing the invention. Copyright only protects expression and not ideas so other books with the same plot could still be created during the period of copyright.
The idea behind a patent is that a limited time monopoly is granted in exchange for full disclosure of the invention. Hence, when the patent expires, any person skilled in the art has all the information necessary to practice the invention.
Moreover, if patents were granted for longer periods of time, the patent system could actually harm invention creation, rather than encourage it as required by the Constitution. Other people would not be able to make improvements to another's patented invention so they could practice the improvements. This discourages others from investing in the R & D to invent new improvements.
Although strong copyright laws actually also discourage the creation of new works similarly, since copyright does not protect facts or plots, this is a smaller concern for copyright.
Finally, if patents were granted for longer periods of time, there would various antitrust concerns.