After the Press was invented, and became cheaper, commercial books started to appear. Eventually copyright on texts emerged to make sure that:
Artists would be protected so their works will not be re-printed by publishes and prints.
Make sure other prints won't be able to re-print the works of other publishers.
At first it was applied exclusively to written works. Not to audio or video recording, which did not exist yet, nor to to melodies, pictures, videos, etc.
It was decided that after a limited time when the author or his estate held the exclusive copyrights for the work, the work would be transferred to the public domain, to make sure it can be freely reused and manipulated by future generations. The first such term in the USA was 14 years with a potential extension of another 14 years.